This commit is contained in:
+9
-1
@@ -207,9 +207,11 @@ export function Modal({
|
||||
export function Badge({
|
||||
children,
|
||||
tone = "slate",
|
||||
className,
|
||||
}: {
|
||||
children: ReactNode;
|
||||
tone?: "slate" | "green" | "amber" | "red" | "blue";
|
||||
className?: string;
|
||||
}) {
|
||||
const tones: Record<string, string> = {
|
||||
slate: "bg-slate-100 text-slate-700",
|
||||
@@ -219,7 +221,13 @@ export function Badge({
|
||||
blue: "bg-blue-100 text-blue-700",
|
||||
};
|
||||
return (
|
||||
<span className={cx("inline-flex items-center rounded-md px-2 py-0.5 text-xs font-medium", tones[tone])}>
|
||||
<span
|
||||
className={cx(
|
||||
"inline-flex items-center rounded-md px-2 py-0.5 text-xs font-medium",
|
||||
tones[tone],
|
||||
className,
|
||||
)}
|
||||
>
|
||||
{children}
|
||||
</span>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user