.
This commit is contained in:
parent
543ceb69f2
commit
9931a4a839
@ -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>
|
||||
);
|
||||
};
|
||||
|
||||
Loading…
Reference in New Issue
Block a user