Files
Nexora/resources/views/components/stats-card.blade.php
Javi 356f56eebd
Some checks failed
linter / quality (push) Has been cancelled
tests / ci (push) Has been cancelled
first commit
2025-04-23 00:14:33 +06:00

30 lines
1.0 KiB
PHP

@props([
'title',
'value',
'icon', // ← Añade esta línea
'color',
'trend' => null, // Valor por defecto: null
'trendColor' => 'text-gray-500' // Color por defecto
])
<div class="bg-white p-6 rounded-lg shadow">
<div class="flex items-center justify-between">
<div>
<p class="text-sm text-gray-500">{{ $title }}</p>
<p class="text-3xl font-bold">{{ $value }}</p>
</div>
<div class="{{ $color }} p-3 rounded-full">
@if($icon === 'folder')
<x-icons icon="folder" class="w-8 h-8 text-white" />
@elseif($icon === 'document')
<x-icons icon = "document" class="w-8 h-8 text-white" />
@endif
</div>
</div>
<div class="mt-4">
<span class="text-sm {{ $trendColor }}">
<x-icons icon="arrow-up" class="w-4 h-4 inline" /> {{ $trend }}%
</span>
<span class="text-sm text-gray-500">desde el último mes</span>
</div>
</div>