@props([ 'label', 'value', 'subValue' => null, 'progress' => 0, // 0..100 'gradient' => 'brand', // brand | emerald | rose | amber | sky ]) @php $g = [ 'brand' => 'bg-grad-brand', 'emerald' => 'bg-grad-emerald', 'rose' => 'bg-grad-rose', 'amber' => 'bg-grad-amber', 'sky' => 'bg-grad-sky', ][$gradient] ?? 'bg-grad-brand'; $progress = max(0, min(100, (float) $progress)); $circumference = 2 * pi() * 36; // r=36 $offset = $circumference - ($progress / 100) * $circumference; @endphp
{{ $label }}
{{ $value }}
@if ($subValue){{ $subValue }}
@endif @if ($slot->isNotEmpty())