({ className, type, children }: Props)
| 22 | } |
| 23 | |
| 24 | export default function Alert({ className, type, children }: Props) { |
| 25 | return ( |
| 26 | <div |
| 27 | className={classNames(styles.alert, className, { |
| 28 | [styles.danger]: type === 'danger', |
| 29 | [styles.info]: type === 'info', |
| 30 | })} |
| 31 | role="alert" |
| 32 | > |
| 33 | {icon(type)} |
| 34 | <span>{children}</span> |
| 35 | </div> |
| 36 | ); |
| 37 | } |