annotate 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
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 'icon', // SVG icon as a Blade include or HTML
56d9c64d64aa Setting up the base, still have plenty of work to be done here.
luka
parents:
diff changeset
3 'title',
56d9c64d64aa Setting up the base, still have plenty of work to be done here.
luka
parents:
diff changeset
4 'value',
56d9c64d64aa Setting up the base, still have plenty of work to be done here.
luka
parents:
diff changeset
5 'subtitle' => '',
56d9c64d64aa Setting up the base, still have plenty of work to be done here.
luka
parents:
diff changeset
6 'color' => 'blue', // For icon background
56d9c64d64aa Setting up the base, still have plenty of work to be done here.
luka
parents:
diff changeset
7 ])
56d9c64d64aa Setting up the base, still have plenty of work to be done here.
luka
parents:
diff changeset
8
56d9c64d64aa Setting up the base, still have plenty of work to be done here.
luka
parents:
diff changeset
9 @php
56d9c64d64aa Setting up the base, still have plenty of work to be done here.
luka
parents:
diff changeset
10 $bgColor =
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 'green' => 'bg-green-100 text-green-600',
56d9c64d64aa Setting up the base, still have plenty of work to be done here.
luka
parents:
diff changeset
13 'blue' => 'bg-blue-100 text-blue-600',
56d9c64d64aa Setting up the base, still have plenty of work to be done here.
luka
parents:
diff changeset
14 'purple' => 'bg-purple-100 text-purple-600',
56d9c64d64aa Setting up the base, still have plenty of work to be done here.
luka
parents:
diff changeset
15 'yellow' => 'bg-yellow-100 text-yellow-600',
56d9c64d64aa Setting up the base, still have plenty of work to be done here.
luka
parents:
diff changeset
16 'gray' => 'bg-gray-100 text-gray-600',
56d9c64d64aa Setting up the base, still have plenty of work to be done here.
luka
parents:
diff changeset
17 ][$color] ?? 'bg-blue-100 text-blue-600';
56d9c64d64aa Setting up the base, still have plenty of work to be done here.
luka
parents:
diff changeset
18 @endphp
56d9c64d64aa Setting up the base, still have plenty of work to be done here.
luka
parents:
diff changeset
19
56d9c64d64aa Setting up the base, still have plenty of work to be done here.
luka
parents:
diff changeset
20 <div class="flex items-center bg-white rounded-lg shadow p-4 min-w-[170px]">
56d9c64d64aa Setting up the base, still have plenty of work to be done here.
luka
parents:
diff changeset
21 <div class="flex-shrink-0">
56d9c64d64aa Setting up the base, still have plenty of work to be done here.
luka
parents:
diff changeset
22 <span class="inline-flex items-center justify-center h-12 w-12 rounded-full {{ $bgColor }}">
56d9c64d64aa Setting up the base, still have plenty of work to be done here.
luka
parents:
diff changeset
23 {!! $icon !!}
56d9c64d64aa Setting up the base, still have plenty of work to be done here.
luka
parents:
diff changeset
24 </span>
56d9c64d64aa Setting up the base, still have plenty of work to be done here.
luka
parents:
diff changeset
25 </div>
56d9c64d64aa Setting up the base, still have plenty of work to be done here.
luka
parents:
diff changeset
26 <div class="ml-4">
56d9c64d64aa Setting up the base, still have plenty of work to be done here.
luka
parents:
diff changeset
27 <div class="text-lg font-semibold text-gray-900">{{ $value }}</div>
56d9c64d64aa Setting up the base, still have plenty of work to be done here.
luka
parents:
diff changeset
28 <div class="text-gray-500">{{ $title }}</div>
56d9c64d64aa Setting up the base, still have plenty of work to be done here.
luka
parents:
diff changeset
29 @if ($subtitle)
56d9c64d64aa Setting up the base, still have plenty of work to be done here.
luka
parents:
diff changeset
30 <div class="text-xs text-gray-400 mt-1">{{ $subtitle }}</div>
56d9c64d64aa Setting up the base, still have plenty of work to be done here.
luka
parents:
diff changeset
31 @endif
56d9c64d64aa Setting up the base, still have plenty of work to be done here.
luka
parents:
diff changeset
32 </div>
56d9c64d64aa Setting up the base, still have plenty of work to be done here.
luka
parents:
diff changeset
33 </div>