Add StatusChip outline
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user