summaryrefslogtreecommitdiffstats
path: root/src/components/Notice/Notice.tsx
blob: c941bf93949db5a03812409ba393e6b017dca997 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
import { ReactNode } from 'react';
import styles from './Notice.module.scss';

type NoticeType = 'error' | 'info' | 'success' | 'warning';

const Notice = ({
  children,
  type,
}: {
  children: ReactNode;
  type: NoticeType;
}) => {
  return (
    <div className={`${styles.message} ${styles[`message--${type}`]}`}>
      {children}
    </div>
  );
};

export default Notice;