28 lines
581 B
Text
28 lines
581 B
Text
|
|
package ui
|
||
|
|
|
||
|
|
type EmptyStateProps struct {
|
||
|
|
Title string
|
||
|
|
Description string
|
||
|
|
Icon templ.Component
|
||
|
|
Action templ.Component
|
||
|
|
}
|
||
|
|
|
||
|
|
templ EmptyState(props EmptyStateProps) {
|
||
|
|
<section class="ui-empty-state">
|
||
|
|
if props.Icon != nil {
|
||
|
|
<div class="ui-empty-state-icon">
|
||
|
|
@props.Icon
|
||
|
|
</div>
|
||
|
|
}
|
||
|
|
<h3 class="ui-empty-state-title">{ props.Title }</h3>
|
||
|
|
if props.Description != "" {
|
||
|
|
<p class="ui-empty-state-description">{ props.Description }</p>
|
||
|
|
}
|
||
|
|
if props.Action != nil {
|
||
|
|
<div class="ui-empty-state-action">
|
||
|
|
@props.Action
|
||
|
|
</div>
|
||
|
|
}
|
||
|
|
</section>
|
||
|
|
}
|