Add StatusChip outline

This commit is contained in:
thesn10
2026-07-03 12:59:02 +02:00
parent d98a045703
commit 48d6a11fb8

View File

@@ -5,9 +5,26 @@ import type { StatusColor } from "@/lib/status";
interface StatusChipProps {
label: string;
color: StatusColor;
variant?: "soft" | "outline";
}
export function StatusChip({ label, color }: StatusChipProps): JSX.Element {
const OUTLINE_BORDER_CLASS: Record<StatusColor, string> = {
default: "border border-default",
accent: "border border-accent",
success: "border border-success",
warning: "border border-warning",
danger: "border border-danger",
};
export function StatusChip({ label, color, variant = "soft" }: StatusChipProps): JSX.Element {
if (variant === "outline") {
return (
<Chip variant="tertiary" color={color} size="sm" className={OUTLINE_BORDER_CLASS[color]}>
<Chip.Label>{label}</Chip.Label>
</Chip>
);
}
return (
<Chip variant="soft" color={color} size="sm">
<Chip.Label>{label}</Chip.Label>