Mercurial > packages > framework
comparison publishable/resources/views/components/preview-list-card.blade.php @ 2:b44434aaa767
Moving around the components.
Made a big step in the right direction with the Builder and named joins being accessible.
| author | luka |
|---|---|
| date | Wed, 18 Jun 2025 22:28:47 -0400 |
| parents | resources/views/components/preview-list-card.blade.php@56d9c64d64aa |
| children | 84c75d9d90be |
comparison
equal
deleted
inserted
replaced
| 1:56d9c64d64aa | 2:b44434aaa767 |
|---|---|
| 1 @props([ | |
| 2 'title', // e.g. 'Upcoming Milestones' | |
| 3 'icon', // SVG (pass as a Blade include or html) | |
| 4 'items', // Collection of items to show | |
| 5 'itemView', // Partial for rendering each item | |
| 6 'viewData' => [], // Additional data to pass to the partial | |
| 7 'empty' => 'Nothing to show.', | |
| 8 'footer' => null, // Optional (e.g. a "View All" link) | |
| 9 'headerButton' => null, // Optional (e.g. a "Add" link) | |
| 10 ]) | |
| 11 | |
| 12 <x-card :icon="$icon" :title="$title" :headerButton="$headerButton" :footer="$footer"> | |
| 13 @if ($items->count()) | |
| 14 <ul class="divide-y divide-gray-100"> | |
| 15 @foreach ($items as $item) | |
| 16 @include($itemView, array_merge(['item' => $item], $viewData ?? [])) | |
| 17 @endforeach | |
| 18 </ul> | |
| 19 @else | |
| 20 <div class="text-gray-400 text-sm">{{ $empty }}</div> | |
| 21 @endif | |
| 22 </x-card> |
