28 lines
1.0 KiB
PHP
28 lines
1.0 KiB
PHP
@props(['status', 'label' => null])
|
|
|
|
@php
|
|
$colors = [
|
|
'new' => 'bg-blue-100 text-blue-800 dark:bg-blue-900 dark:text-blue-200',
|
|
'assigned' => 'bg-purple-100 text-purple-800 dark:bg-purple-900 dark:text-purple-200',
|
|
'in_progress' => 'bg-yellow-100 text-yellow-800 dark:bg-yellow-900 dark:text-yellow-200',
|
|
'review' => 'bg-orange-100 text-orange-800 dark:bg-orange-900 dark:text-orange-200',
|
|
'closed' => 'bg-green-100 text-green-800 dark:bg-green-900 dark:text-green-200',
|
|
];
|
|
|
|
$icons = [
|
|
'new' => '●',
|
|
'assigned' => '◐',
|
|
'in_progress' => '◔',
|
|
'review' => '◕',
|
|
'closed' => '✓',
|
|
];
|
|
|
|
$colorClass = $colors[$status] ?? 'bg-gray-100 text-gray-800 dark:bg-gray-700 dark:text-gray-200';
|
|
$icon = $icons[$status] ?? '●';
|
|
@endphp
|
|
|
|
<span {{ $attributes->merge(['class' => "inline-flex items-center gap-1 rounded-full px-2 py-1 text-xs font-medium {$colorClass}"]) }}>
|
|
<span aria-hidden="true">{{ $icon }}</span>
|
|
<span>{{ $label ?? __(ucfirst(str_replace('_', ' ', $status))) }}</span>
|
|
</span>
|