(type: AlertType)
| 13 | } |
| 14 | |
| 15 | function icon(type: AlertType) { |
| 16 | switch (type) { |
| 17 | case 'danger': |
| 18 | return <FiAlertTriangle className={styles.icon} />; |
| 19 | case 'info': |
| 20 | return <FiInfo className={styles.icon} />; |
| 21 | } |
| 22 | } |
| 23 | |
| 24 | export default function Alert({ className, type, children }: Props) { |
| 25 | return ( |