Mercurial > borealpoint
comparison resources/views/components/dashboard-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 'icon', // SVG icon as a Blade include or HTML | |
| 3 'title', | |
| 4 'value', | |
| 5 'subtitle' => '', | |
| 6 'color' => 'blue', // For icon background | |
| 7 ]) | |
| 8 | |
| 9 @php | |
| 10 $bgColor = | |
| 11 [ | |
| 12 'green' => 'green', | |
| 13 'blue' => 'blue', | |
| 14 'purple' => 'purple', | |
| 15 'yellow' => 'yellow', | |
| 16 'gray' => 'gray', | |
| 17 ][$color] ?? 'blue'; | |
| 18 @endphp | |
| 19 | |
| 20 <div class="dashboard-card"> | |
| 21 <div class="d-flex-shrink-0"> | |
| 22 <span class="inline-flex icon items-center justify-center h-12 w-12 rounded-full {{ $bgColor }}"> | |
| 23 {!! $icon !!} | |
| 24 </span> | |
| 25 </div> | |
| 26 <div class="ml-4"> | |
| 27 <div class="fs-4 fw-medium">{{ $value }}</div> | |
| 28 <div class="fs-5 fw-medium text-secondary">{{ $title }}</div> | |
| 29 @if ($subtitle) | |
| 30 <div class="fs-6 text-secondary">{{ $subtitle }}</div> | |
| 31 @endif | |
| 32 </div> | |
| 33 </div> |
