annotate 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
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1
56d9c64d64aa Setting up the base, still have plenty of work to be done here.
luka
parents:
diff changeset
1 @props([
56d9c64d64aa Setting up the base, still have plenty of work to be done here.
luka
parents:
diff changeset
2 'title', // e.g. 'Upcoming Milestones'
56d9c64d64aa Setting up the base, still have plenty of work to be done here.
luka
parents:
diff changeset
3 'icon', // SVG (pass as a Blade include or html)
56d9c64d64aa Setting up the base, still have plenty of work to be done here.
luka
parents:
diff changeset
4 'items', // Collection of items to show
56d9c64d64aa Setting up the base, still have plenty of work to be done here.
luka
parents:
diff changeset
5 'itemView', // Partial for rendering each item
56d9c64d64aa Setting up the base, still have plenty of work to be done here.
luka
parents:
diff changeset
6 'viewData' => [], // Additional data to pass to the partial
56d9c64d64aa Setting up the base, still have plenty of work to be done here.
luka
parents:
diff changeset
7 'empty' => 'Nothing to show.',
56d9c64d64aa Setting up the base, still have plenty of work to be done here.
luka
parents:
diff changeset
8 'footer' => null, // Optional (e.g. a "View All" link)
56d9c64d64aa Setting up the base, still have plenty of work to be done here.
luka
parents:
diff changeset
9 'headerButton' => null, // Optional (e.g. a "Add" link)
56d9c64d64aa Setting up the base, still have plenty of work to be done here.
luka
parents:
diff changeset
10 ])
56d9c64d64aa Setting up the base, still have plenty of work to be done here.
luka
parents:
diff changeset
11
56d9c64d64aa Setting up the base, still have plenty of work to be done here.
luka
parents:
diff changeset
12 <x-card :icon="$icon" :title="$title" :headerButton="$headerButton" :footer="$footer">
56d9c64d64aa Setting up the base, still have plenty of work to be done here.
luka
parents:
diff changeset
13 @if ($items->count())
56d9c64d64aa Setting up the base, still have plenty of work to be done here.
luka
parents:
diff changeset
14 <ul class="divide-y divide-gray-100">
56d9c64d64aa Setting up the base, still have plenty of work to be done here.
luka
parents:
diff changeset
15 @foreach ($items as $item)
56d9c64d64aa Setting up the base, still have plenty of work to be done here.
luka
parents:
diff changeset
16 @include($itemView, array_merge(['item' => $item], $viewData ?? []))
56d9c64d64aa Setting up the base, still have plenty of work to be done here.
luka
parents:
diff changeset
17 @endforeach
56d9c64d64aa Setting up the base, still have plenty of work to be done here.
luka
parents:
diff changeset
18 </ul>
56d9c64d64aa Setting up the base, still have plenty of work to be done here.
luka
parents:
diff changeset
19 @else
56d9c64d64aa Setting up the base, still have plenty of work to be done here.
luka
parents:
diff changeset
20 <div class="text-gray-400 text-sm">{{ $empty }}</div>
56d9c64d64aa Setting up the base, still have plenty of work to be done here.
luka
parents:
diff changeset
21 @endif
56d9c64d64aa Setting up the base, still have plenty of work to be done here.
luka
parents:
diff changeset
22 </x-card>