From 0ff94252e27a80221e221c6159761f46aa111ac3 Mon Sep 17 00:00:00 2001 From: Armand Philippot Date: Fri, 15 Apr 2022 14:31:40 +0200 Subject: chore: add a Notice component --- src/components/atoms/layout/notice.tsx | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 src/components/atoms/layout/notice.tsx (limited to 'src/components/atoms/layout/notice.tsx') diff --git a/src/components/atoms/layout/notice.tsx b/src/components/atoms/layout/notice.tsx new file mode 100644 index 0000000..e919182 --- /dev/null +++ b/src/components/atoms/layout/notice.tsx @@ -0,0 +1,25 @@ +import { VFC } from 'react'; +import styles from './notice.module.scss'; + +export type NoticeKind = 'error' | 'info' | 'success' | 'warning'; + +export type NoticeProps = { + /** + * The notice kind. + */ + kind: NoticeKind; + /** + * The notice body. + */ + message: string; +}; + +const Notice: VFC = ({ kind, message }) => { + const kindClass = `wrapper--${kind}`; + + return ( +
{message}
+ ); +}; + +export default Notice; -- cgit v1.2.3