This commit is contained in:
David Arranz 2024-08-22 19:46:24 +02:00
parent 543ceb69f2
commit 9931a4a839

View File

@ -13,8 +13,12 @@ function stringToColor(str: string) {
return color;
}
export const ColorBadge = ({ label }: { label: string }) => {
export const ColorBadge = ({ label, className }: { label: string; className?: string }) => {
const backgroundColor = stringToColor(label);
return <Badge style={{ backgroundColor, color: "#fff" }}>{label}</Badge>;
return (
<Badge className={className} style={{ backgroundColor, color: "#fff" }}>
{label}
</Badge>
);
};