40 lines
991 B
TypeScript
40 lines
991 B
TypeScript
import { cn } from "@/lib/utils"
|
|
import { Badge } from "@/components/ui/badge"
|
|
|
|
const priorityConfig = {
|
|
LOW: {
|
|
label: "Baixa",
|
|
className: "bg-slate-100 text-slate-600 border-transparent",
|
|
},
|
|
MEDIUM: {
|
|
label: "Media",
|
|
className: "bg-blue-100 text-blue-600 border-transparent",
|
|
},
|
|
HIGH: {
|
|
label: "Alta",
|
|
className: "bg-amber-100 text-amber-700 border-transparent",
|
|
},
|
|
URGENT: {
|
|
label: "Urgente",
|
|
className: "bg-red-100 text-red-700 border-transparent",
|
|
},
|
|
} satisfies Record<string, { label: string; className: string }>
|
|
|
|
type TicketPriorityPillProps = {
|
|
priority: keyof typeof priorityConfig
|
|
}
|
|
|
|
export function TicketPriorityPill({ priority }: TicketPriorityPillProps) {
|
|
const config = priorityConfig[priority]
|
|
return (
|
|
<Badge
|
|
variant="outline"
|
|
className={cn(
|
|
"rounded-full px-2.5 py-1 text-xs font-medium",
|
|
config?.className ?? ""
|
|
)}
|
|
>
|
|
{config?.label ?? priority}
|
|
</Badge>
|
|
)
|
|
}
|