@props([ 'title', 'value', 'description' => null, 'variant' => 'primary', 'href' => null, ]) @php $visual = match ($variant) { 'success' => [ 'icon' => 'bg-emerald-100 text-emerald-600', 'detail' => 'text-emerald-700', 'decoration' => 'bg-emerald-500', ], 'warning' => [ 'icon' => 'bg-amber-100 text-amber-600', 'detail' => 'text-amber-700', 'decoration' => 'bg-amber-500', ], 'danger' => [ 'icon' => 'bg-red-100 text-red-600', 'detail' => 'text-red-700', 'decoration' => 'bg-red-500', ], 'info' => [ 'icon' => 'bg-sky-100 text-sky-600', 'detail' => 'text-sky-700', 'decoration' => 'bg-sky-500', ], 'neutral' => [ 'icon' => 'bg-slate-100 text-slate-600', 'detail' => 'text-slate-700', 'decoration' => 'bg-slate-400', ], default => [ 'icon' => 'bg-indigo-100 text-indigo-600', 'detail' => 'text-indigo-700', 'decoration' => 'bg-indigo-500', ], }; $tag = $href ? 'a' : 'article'; @endphp <{{ $tag }} @if ($href) href="{{ $href }}" @endif {{ $attributes->class([ 'group relative overflow-hidden rounded-2xl', 'border border-slate-200 bg-white p-5 shadow-sm', 'transition duration-200', 'hover:-translate-y-0.5 hover:border-slate-300 hover:shadow-md' => $href, ]) }} >
{{ $title }}
{{ $value }}
@if ($description){{ $description }}
@endif