15 lines
557 B
PHP
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>
|