33 lines
1023 B
PHP
33 lines
1023 B
PHP
<x-filament-widgets::widget>
|
|
<style>
|
|
.stats-grid {
|
|
display: grid;
|
|
grid-template-columns: repeat(1, minmax(0, 1fr));
|
|
gap: 16px;
|
|
}
|
|
@media (min-width: 640px) {
|
|
.stats-grid {
|
|
grid-template-columns: repeat(2, minmax(0, 1fr));
|
|
}
|
|
}
|
|
@media (min-width: 1024px) {
|
|
.stats-grid {
|
|
grid-template-columns: repeat(5, minmax(0, 1fr));
|
|
}
|
|
}
|
|
</style>
|
|
<div class="stats-grid">
|
|
@foreach($this->getStats() as $stat)
|
|
<x-filament::section
|
|
:icon="$stat['icon']"
|
|
:icon-color="$stat['color']"
|
|
>
|
|
<x-slot name="heading">
|
|
<span class="text-2xl font-bold">{{ $stat['value'] }}</span>
|
|
</x-slot>
|
|
<x-slot name="description">{{ $stat['label'] }}</x-slot>
|
|
</x-filament::section>
|
|
@endforeach
|
|
</div>
|
|
</x-filament-widgets::widget>
|