{{-- Stat Card Component - TailAdmin style Usage: --}} @props([ 'value', 'label', 'suffix' => null, 'prefix' => null, 'icon' => null, 'iconClass' => 'text-gray-500 dark:text-gray-400', 'status' => null, 'statusText' => null, 'href' => null, 'progress' => null, 'progressColor' => 'bg-brand-500', 'clickable' => false, 'compact' => false, 'change' => null, 'changeLabel' => null, ]) @php $tag = $href ? 'a' : 'div'; $statusClasses = [ 'success' => 'text-success-500', 'warning' => 'text-warning-500', 'danger' => 'text-error-500', 'info' => 'text-blue-light-500', 'muted' => 'text-gray-500 dark:text-gray-400', ]; $statusClass = $statusClasses[$status] ?? ''; @endphp <{{ $tag }} @if($href) href="{{ $href }}" @endif {{ $attributes->class([ 'rounded-2xl border border-gray-200 bg-white p-6 dark:border-gray-800 dark:bg-white/[0.03]', 'transition-colors duration-150 hover:bg-gray-50 dark:hover:bg-gray-800/50 cursor-pointer' => $href || $clickable, ]) }} >
@if($change !== null) = 0 ? 'text-success-500' : 'text-error-500'])> {{ $change >= 0 ? '+' : '' }}{{ $change }}% @endif {{ $changeLabel ?? 'from last period' }}