@props(['label', 'value', 'href' => null, 'tone' => 'default', 'note' => null]) @php //Tone carries meaning, not decoration: a figure that needs attention reads //differently from one that does not. Zero is always neutral, because //"0 unpaid invoices" is good news and should never look like a warning. $accent = ((int) $value > 0 && $tone === 'alert') ? 'text-amber-400' : (((int) $value > 0 && $tone === 'good') ? 'text-emerald-400' : 'text-white'); @endphp <{{ $href ? 'a' : 'div' }} @if ($href) href="{{ $href }}" @endif class="block rounded-xl border border-slate-800 bg-slate-900 p-4 transition {{ $href ? 'hover:border-slate-700 hover:bg-slate-800/60' : '' }}">
{{ $value }}
{{ $label }}
{{-- A figure beside the figure, never folded into it. Always neutral: the tone above is decided by $value alone, so nothing a note says can colour a tile — a pending service must not read as a healthy one. --}} @if ($note)
{{ $note }}
@endif