Commit awal: prototipe UI SIAKAD Untan
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
{{-- Kartu angka tunggal dengan ikon. Nilai harus nyata dari DB. Dengan href, seluruh kartu menjadi tautan. --}}
|
||||
@props(['label', 'value', 'icon' => 'chart-bar', 'hint' => null, 'href' => null])
|
||||
|
||||
@php
|
||||
$shown = is_int($value) ? number_format($value, 0, ',', '.') : $value;
|
||||
$tag = $href ? 'a' : 'div';
|
||||
@endphp
|
||||
|
||||
<x-glass.panel :as="$tag" :href="$href" {{ $attributes->class('stat') }}>
|
||||
<span class="stat__icon" aria-hidden="true"><x-dynamic-component :component="'heroicon-o-'.$icon" /></span>
|
||||
<span class="stat__label">{{ $label }}</span>
|
||||
<span class="stat__value">{{ $shown }}</span>
|
||||
@if ($hint) <span class="stat__hint">{{ $hint }}</span> @endif
|
||||
</x-glass.panel>
|
||||
Reference in New Issue
Block a user