Files
siakad/resources/views/components/ui/figure.blade.php
T
2026-10-24 11:45:32 +07:00

15 lines
557 B
PHP

{{-- Satu angka: label, nilai, petunjuk, dan tautan opsional (seluruh sel menjadi tautan). --}}
@props(['label', 'value', 'href' => null, 'hint' => null])
@php
$shown = is_int($value) ? number_format($value, 0, ',', '.') : $value;
@endphp
<div {{ $attributes->class('figure') }}>
<dt class="figure__label">
@if ($href) <a href="{{ $href }}" class="figure__link">{{ $label }}</a> @else {{ $label }} @endif
</dt>
<dd class="figure__value num">{{ $shown }}</dd>
@if ($hint) <dd class="figure__hint">{{ $hint }}</dd> @endif
</div>