60 lines
2.2 KiB
PHP
60 lines
2.2 KiB
PHP
<?php $attributes ??= new \Illuminate\View\ComponentAttributeBag;
|
|
|
|
$__newAttributes = [];
|
|
$__propNames = \Illuminate\View\ComponentAttributeBag::extractPropNames((['title', 'value', 'icon', 'color']));
|
|
|
|
foreach ($attributes->all() as $__key => $__value) {
|
|
if (in_array($__key, $__propNames)) {
|
|
$$__key = $$__key ?? $__value;
|
|
} else {
|
|
$__newAttributes[$__key] = $__value;
|
|
}
|
|
}
|
|
|
|
$attributes = new \Illuminate\View\ComponentAttributeBag($__newAttributes);
|
|
|
|
unset($__propNames);
|
|
unset($__newAttributes);
|
|
|
|
foreach (array_filter((['title', 'value', 'icon', 'color']), 'is_string', ARRAY_FILTER_USE_KEY) as $__key => $__value) {
|
|
$$__key = $$__key ?? $__value;
|
|
}
|
|
|
|
$__defined_vars = get_defined_vars();
|
|
|
|
foreach ($attributes->all() as $__key => $__value) {
|
|
if (array_key_exists($__key, $__defined_vars)) unset($$__key);
|
|
}
|
|
|
|
unset($__defined_vars, $__key, $__value); ?>
|
|
|
|
<?php
|
|
// Map warna untuk icon background dan text
|
|
$colors = [
|
|
'indigo' => 'bg-indigo-100 text-indigo-600 shadow-indigo-100',
|
|
'emerald' => 'bg-emerald-100 text-emerald-600 shadow-emerald-100',
|
|
'rose' => 'bg-rose-100 text-rose-600 shadow-rose-100',
|
|
'amber' => 'bg-amber-100 text-amber-600 shadow-amber-100',
|
|
'blue' => 'bg-blue-100 text-blue-600 shadow-blue-100',
|
|
][$color ?? 'indigo'];
|
|
?>
|
|
|
|
<div class="bg-white p-6 rounded-3xl border border-slate-200 shadow-sm hover:shadow-md transition-all duration-300">
|
|
<div class="flex items-center justify-between mb-4">
|
|
<div class="w-12 h-12 <?php echo e($colors); ?> rounded-2xl flex items-center justify-center shadow-sm">
|
|
<i class="fas <?php echo e($icon); ?> text-xl"></i>
|
|
</div>
|
|
<span class="text-[10px] font-bold text-slate-400 uppercase tracking-widest">Statistik</span>
|
|
</div>
|
|
|
|
<div class="space-y-1">
|
|
<h3 class="text-3xl font-black text-slate-800 leading-none">
|
|
<?php echo e($value); ?>
|
|
|
|
</h3>
|
|
<p class="text-xs font-bold text-slate-500 uppercase tracking-tighter">
|
|
<?php echo e($title); ?>
|
|
|
|
</p>
|
|
</div>
|
|
</div><?php /**PATH /home/u806112658/domains/earrinasia.com/ilycats/resources/views/components/stats-card.blade.php ENDPATH**/ ?>
|