12 lines
334 B
JavaScript
12 lines
334 B
JavaScript
const Badge = (props) => {
|
|
const { text = '', variant = 'secondary', color = '' } = props;
|
|
|
|
return (
|
|
<span className={`badge ${!color ? `text-bg-${variant}` : ''} mx-1`} style={{ backgroundColor: color }}>
|
|
{text}
|
|
</span>
|
|
);
|
|
// <span className={`badge text-bg-${variant}`}>{text};</span>
|
|
};
|
|
export default Badge;
|