@props(['change' => null]) @php $direction = $change['direction'] ?? 'flat'; $formatted = $change['formatted'] ?? null; @endphp @if ($formatted) $direction === 'up', 'text-rose-600' => $direction === 'down', 'text-slate-400' => $direction === 'flat', ])> @if ($direction === 'up') ↑ @elseif ($direction === 'down') ↓ @else — @endif {{ $formatted }} @endif