blob: 472efa5686aec902e428c4b3594c8d534dcd2115 (
plain)
| 1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
 | import { ReactNode } from 'react';
import styles from './Notice.module.scss';
type NoticeType = 'error' | 'info' | 'success' | 'warning';
const Notice = ({
  children,
  type,
}: {
  children: ReactNode;
  type: NoticeType;
}) => {
  const withModifier = `message--${type}`;
  return (
    <div className={`${styles.message} ${styles[withModifier]}`}>
      {children}
    </div>
  );
};
export default Notice;
 |