mirror of https://github.com/MaxLeiter/Drift
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
18 lines
400 B
TypeScript
18 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
|