mirror of
https://github.com/pawelmalak/snippet-box.git
synced 2025-12-21 21:33:10 +01:00
13 lines
255 B
TypeScript
13 lines
255 B
TypeScript
import { Color } from '../../typescript/types';
|
|
|
|
interface Props {
|
|
text: string;
|
|
color: Color;
|
|
}
|
|
|
|
export const Badge = (props: Props): JSX.Element => {
|
|
const { text, color } = props;
|
|
|
|
return <span className={`badge bg-${color}`}>{text}</span>;
|
|
};
|