@props([ 'label' => '', 'value' => '', 'delta' => null, // e.g. "+12.4%" 'trend' => null, // "up" | "down" | null 'icon' => null, // icon name from x-icon 'hint' => null, ]) @php $trendClass = match ($trend) { 'up' => 'is-positive', 'down' => 'is-negative', default => '', }; @endphp
merge(['class' => 'dc-stat']) }}>
{{ $label }} @if ($icon) @endif
{{ $value }}
@if ($delta)
@if ($trend === 'up') @endif @if ($trend === 'down') @endif {{ $delta }}
@endif @if ($hint)
{{ $hint }}
@endif