Mercurial > packages > framework
diff resources/views/components/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 |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/resources/views/components/card.blade.php Mon Jun 09 23:07:17 2025 -0400 @@ -0,0 +1,23 @@ +@props([ + 'title' => null, // e.g. 'Upcoming Milestones' + 'icon' => null, // SVG (pass as a Blade include or html) + 'empty' => 'Nothing to show.', + 'footer' => null, // Optional (e.g. a "View All" link) + 'headerButton' => null, //button or link for the right side of the header +]) + +<div class="bg-white p-4 rounded-lg shadow min-h-[200px]"> + <div class="flex justify-between items-center"> + <h4 class="font-semibold text-gray-800 mb-3 flex items-center"> + {!! $icon ?? '' !!} + <span class="ml-2">{{ $title }}</span> + </h4> + {!! $headerButton !!} + </div> + {{ $slot }} + @if ($footer) + <div class="text-right mt-3"> + {!! $footer !!} + </div> + @endif +</div>
