Initial commit: Struktur aplikasi ilycats
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
@props(['status'])
|
||||
|
||||
@php
|
||||
$cleanStatus = strtolower(trim($status ?? ''));
|
||||
$safeWords = ['sehat', 'normal', 'aktif', 'ok', 'good', 'sembuh', '-', ''];
|
||||
|
||||
$isHealthy = in_array($cleanStatus, $safeWords);
|
||||
|
||||
$classes = $isHealthy
|
||||
? 'bg-green-100 text-green-700 border-green-200'
|
||||
: 'bg-red-100 text-red-700 border-red-200';
|
||||
@endphp
|
||||
|
||||
<span {{ $attributes->merge(['class' => "px-3 py-1 rounded-full text-xs font-bold border $classes"]) }}>
|
||||
<i class="fas {{ $isHealthy ? 'fa-check-circle' : 'fa-pills' }} mr-1"></i>
|
||||
{{ $isHealthy ? 'Sehat / Normal' : $status }}
|
||||
</span>
|
||||
Reference in New Issue
Block a user