diff options
Diffstat (limited to 'src/components/atoms/layout/notice.tsx')
| -rw-r--r-- | src/components/atoms/layout/notice.tsx | 36 |
1 files changed, 0 insertions, 36 deletions
diff --git a/src/components/atoms/layout/notice.tsx b/src/components/atoms/layout/notice.tsx deleted file mode 100644 index 9f69af2..0000000 --- a/src/components/atoms/layout/notice.tsx +++ /dev/null @@ -1,36 +0,0 @@ -import { FC, HTMLAttributes } from 'react'; -import styles from './notice.module.scss'; - -export type NoticeKind = 'error' | 'info' | 'success' | 'warning'; - -export type NoticeProps = Omit<HTMLAttributes<HTMLElement>, 'children'> & { - /** - * The notice kind. - */ - kind: NoticeKind; - /** - * The notice body. - */ - message: string; -}; - -/** - * Notice component - * - * Render a colored message depending on notice kind. - */ -export const Notice: FC<NoticeProps> = ({ - className = '', - kind, - message, - ...props -}) => { - const kindClass = `wrapper--${kind}`; - const noticeClass = `${styles.wrapper} ${styles[kindClass]} ${className}`; - - return ( - <div {...props} className={noticeClass}> - {message} - </div> - ); -}; |
