@props([ 'label', 'value' => 0, 'icon' => null, 'url' => null, 'color' => 'primary', 'column' => null, ]) @php $tag = $url ? 'a' : 'div'; $classes = Arr::toCssClasses([ 'text-white d-block rounded position-relative overflow-hidden text-decoration-none', "bg-$color" => !str_contains($color, '#'), ]); Assets::addScripts(['counterup']); @endphp
<{{ $tag }} {{ $attributes->merge([ 'class' => $classes, 'href' => $url, ]) }} @style([ 'background-color: ' . $color => str_contains($color, '#'), ]) >
{{ $label }}
@if (is_int($value)) 0 @else {{ $value }} @endif
@if($icon) @endif