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
357 B
TypeScript
18 lines
357 B
TypeScript
import styles from "./note.module.css"
|
|
|
|
const Note = ({
|
|
type = "info",
|
|
children,
|
|
...props
|
|
}: {
|
|
type: "info" | "warning" | "error"
|
|
children: React.ReactNode
|
|
} & React.ComponentProps<"div">) => (
|
|
<div className={`${styles.note} ${styles[type]}`} {...props}>
|
|
<strong className={styles.type}>{type}:</strong>
|
|
{children}
|
|
</div>
|
|
)
|
|
|
|
export default Note
|