comparison resources/views/components/dashboard-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 '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' => 'bg-green-100 text-green-600',
13 'blue' => 'bg-blue-100 text-blue-600',
14 'purple' => 'bg-purple-100 text-purple-600',
15 'yellow' => 'bg-yellow-100 text-yellow-600',
16 'gray' => 'bg-gray-100 text-gray-600',
17 ][$color] ?? 'bg-blue-100 text-blue-600';
18 @endphp
19
20 <div class="flex items-center bg-white rounded-lg shadow p-4 min-w-[170px]">
21 <div class="flex-shrink-0">
22 <span class="inline-flex 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="text-lg font-semibold text-gray-900">{{ $value }}</div>
28 <div class="text-gray-500">{{ $title }}</div>
29 @if ($subtitle)
30 <div class="text-xs text-gray-400 mt-1">{{ $subtitle }}</div>
31 @endif
32 </div>
33 </div>