Mercurial > borealpoint
comparison resources/views/components/preview-list-card.blade.php @ 0:9d7dcd54c677
Initial Commit and package setup
| author | luka |
|---|---|
| date | Sat, 23 Aug 2025 22:20:51 -0400 |
| parents | |
| children |
comparison
equal
deleted
inserted
replaced
| -1:000000000000 | 0:9d7dcd54c677 |
|---|---|
| 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 <div class="dashboard-card flex-column align-items-stretch"> | |
| 14 <div class="d-flex justify-content-between"> | |
| 15 <h4 class=" items-center align-content-start"> | |
| 16 {!! $icon ?? '' !!} | |
| 17 <span class="ml-2">{{ $title }}</span> | |
| 18 </h4> | |
| 19 {!! $headerButton !!} | |
| 20 </div> | |
| 21 <div class="card-body"> | |
| 22 @if ($items->count()) | |
| 23 <ul class="px-1"> | |
| 24 @foreach ($items as $item) | |
| 25 @include($itemView, array_merge(['item' => $item], $viewData ?? [])) | |
| 26 @endforeach | |
| 27 </ul> | |
| 28 @else | |
| 29 <div class="text-gray-400 text-sm">{{ $empty }}</div> | |
| 30 @endif | |
| 31 </div> | |
| 32 @if ($footer) | |
| 33 <div class="text-right mt-3"> | |
| 34 {!! $footer !!} | |
| 35 </div> | |
| 36 @endif | |
| 37 </div> |
