CoastalCommitsPastes/client/app/components/badges/badge.tsx
2022-11-13 23:02:31 -08:00

17 lines
400 B
TypeScript

import styles from "./badge.module.css"
type BadgeProps = {
type: "primary" | "secondary" | "error" | "warning"
children: React.ReactNode
}
const Badge = ({ type, children }: BadgeProps) => {
return (
<div className={styles.container}>
<div className={`${styles.badge} ${styles[type]}`}>
<span className={styles.badgeText}>{children}</span>
</div>
</div>
)
}
export default Badge