From 6a898c510f5c9b5469f639472970d1fefe9766ca Mon Sep 17 00:00:00 2001 From: Armand Philippot Date: Mon, 11 Apr 2022 18:14:23 +0200 Subject: chore: add a NoScript component --- src/components/atoms/layout/no-script.tsx | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 src/components/atoms/layout/no-script.tsx (limited to 'src/components/atoms/layout/no-script.tsx') diff --git a/src/components/atoms/layout/no-script.tsx b/src/components/atoms/layout/no-script.tsx new file mode 100644 index 0000000..6358cf8 --- /dev/null +++ b/src/components/atoms/layout/no-script.tsx @@ -0,0 +1,21 @@ +import { VFC } from 'react'; +import styles from './no-script.module.scss'; + +export type NoScriptProps = { + /** + * The noscript message. + */ + message: string; + /** + * The message position. Default: initial. + */ + position?: 'initial' | 'top'; +}; + +const NoScript: VFC = ({ message, position = 'initial' }) => { + const positionClass = styles[`noscript--${position}`]; + + return
{message}
; +}; + +export default NoScript; -- cgit v1.2.3