import type { ComponentProps } from "react";
import { Badge } from "@/components/ui/pxl/badge";
import type { TaskNotes } from "@/lib/schemas/pxl/tasknotes";
type Priority = "low" | "high" | "normal";
const priorityVariants: Record<
NonNullable<ComponentProps<typeof Badge>["variant"]>
const priorityLabels: Record<
}: ComponentProps<typeof Badge> & {
labels?: Record<Priority, string>;
<Badge variant={priorityVariants[value]} {...props}>
xmlns="http://www.w3.org/2000/svg"
className="size-3 mr-0.5"
<path d="M6 4h14v2h-2v2h-2V6H6v6h10v-2h2v2h2v2H6v8H4V2h2v2Zm10 6h-2V8h2v2Z" />
{showLabel && labels[value]}
function TaskNotesPriorityBadge({
}: ComponentProps<typeof PriorityBadge> & {
return <PriorityBadge {...props} value={task.priority === "none" ? "low" : task.priority} />;
PriorityBadge.TaskNotes = TaskNotesPriorityBadge;
export { PriorityBadge };