Files
snippet-box/client/src/components/UI/Badge.tsx
2021-09-21 15:47:46 +02:00

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>;
};