Initial commit
This commit is contained in:
25
resources/views/components/issue/priority-badge.blade.php
Normal file
25
resources/views/components/issue/priority-badge.blade.php
Normal file
@@ -0,0 +1,25 @@
|
||||
@props(['priority', 'label' => null])
|
||||
|
||||
@php
|
||||
$colors = [
|
||||
'low' => 'bg-gray-100 text-gray-700 dark:bg-gray-700 dark:text-gray-300',
|
||||
'medium' => 'bg-blue-100 text-blue-700 dark:bg-blue-900 dark:text-blue-300',
|
||||
'high' => 'bg-orange-100 text-orange-700 dark:bg-orange-900 dark:text-orange-300',
|
||||
'urgent' => 'bg-red-100 text-red-700 dark:bg-red-900 dark:text-red-300',
|
||||
];
|
||||
|
||||
$icons = [
|
||||
'low' => '↓',
|
||||
'medium' => '→',
|
||||
'high' => '↑',
|
||||
'urgent' => '⇈',
|
||||
];
|
||||
|
||||
$colorClass = $colors[$priority] ?? 'bg-gray-100 text-gray-700 dark:bg-gray-700 dark:text-gray-300';
|
||||
$icon = $icons[$priority] ?? '→';
|
||||
@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($priority)) }}</span>
|
||||
</span>
|
||||
Reference in New Issue
Block a user