@props([ 'label' => null, 'value' => null, 'icon', 'color' => 'info', 'id' => null, 'url' => null, 'style' => 'flat', // 'flat' (horizontal) o 'small' (vertical) 'vibrant' => true, // Si es true, el fondo de toda la card tendrá el color 'alpineValue' => null // Variable de Alpine.js para x-text (usar alpine-value="expr") ]) @php $xValue = $alpineValue ?? null; @endphp @php $bgClass = $vibrant ? "bg-$color" : ""; $iconBgClass = $vibrant ? "" : "bg-$color"; $textColor = $vibrant ? "text-white" : ""; @endphp @if($style === 'flat') {{-- ESTILO HORIZONTAL (Vibrante o Sobrio) --}}
merge(['class' => "info-box $bgClass shadow-sm mb-3 $textColor", 'id' => $id]) }}>
@if($label) {{ $label }} @endif @if($value) {{ $value }} @endif {{ $slot }} @if($url) Ver más @endif
@else {{-- ESTILO SMALL-BOX (Grande) --}}
merge(['class' => "small-box bg-$color shadow-sm hover-effect", 'id' => $id]) }}>
@if($value)

{{ $value }}

@endif @if($label)

{{ $label }}

@endif {{ $slot }}
@if($url) Ver más @else @endif
@endif