Mercurial > packages > framework
comparison resources/views/components/preview-list-card.blade.php @ 1:56d9c64d64aa
Setting up the base, still have plenty of work to be done here.
| author | luka |
|---|---|
| date | Mon, 09 Jun 2025 23:07:17 -0400 |
| parents | |
| children |
comparison
equal
deleted
inserted
replaced
| 0:07e7262a8cce | 1:56d9c64d64aa |
|---|---|
| 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> |
