@props([ 'label' => '', 'value' => '—', 'icon' => null, 'tone' => 'neutral', 'help' => null, 'trend' => null, // ['direction' => 'up|down|flat', 'value' => '+2.4%'] 'kind' => 'count', // money | count | score 'href' => null, 'loading' => false, ]) @php $toneClass = 'stat--tone-' . ($tone ?: 'neutral'); $classes = trim('stat ' . $toneClass . ($loading ? ' stat--loading' : '')); $Tag = $href ? 'a' : 'div'; @endphp <{{ $Tag }} @if($href) href="{{ $href }}" @endif {{ $attributes->merge(['class' => $classes]) }} @if($help) title="{{ $help }}" @endif >
{{ $help }}
@endif {{ $Tag }}>