You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
19 lines
441 B
TypeScript
19 lines
441 B
TypeScript
// frontend/components/Badge.tsx
|
|
type Tone = "coral" | "blue" | "green" | "violet" | "amber" | "ink";
|
|
export function Badge({
|
|
children,
|
|
tone = "coral",
|
|
variant = "pill",
|
|
}: {
|
|
children: React.ReactNode;
|
|
tone?: Tone;
|
|
variant?: "pill" | "count";
|
|
}) {
|
|
if (variant === "count") return <span className="badge-count">{children}</span>;
|
|
return (
|
|
<span className="badge-pill" data-tone={tone}>
|
|
{children}
|
|
</span>
|
|
);
|
|
}
|