Skip to content

Commit 2fe54d4

Browse files
authored
Conditionally render footer in empty-state component (#19858)
Automatically hide the footer if it is not used in the component. This removes unnecessary padding during rendering. Signed-off-by: Roman B. <roman@lhp-home.ru>
1 parent d5f798b commit 2fe54d4

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

packages/support/resources/views/components/empty-state.blade.php

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
}
2222
2323
$hasDescription = filled((string) $description);
24+
$hasFooter = filled((string) $footer);
2425
$hasIcon = filled($icon);
2526
@endphp
2627

@@ -59,9 +60,11 @@
5960
</p>
6061
@endif
6162

62-
<footer class="fi-empty-state-footer">
63-
{{ $footer }}
64-
</footer>
63+
@if ($hasFooter)
64+
<footer class="fi-empty-state-footer">
65+
{{ $footer }}
66+
</footer>
67+
@endif
6568
</div>
6669
</div>
6770
</section>

0 commit comments

Comments
 (0)