aboutsummaryrefslogtreecommitdiffstats
path: root/src/components/atoms/layout/no-script.tsx
blob: 6358cf84ba2213bea3f9cecf95f83ec6287946db (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
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<NoScriptProps> = ({ message, position = 'initial' }) => {
  const positionClass = styles[`noscript--${position}`];

  return <div className={`${styles.noscript} ${positionClass}`}>{message}</div>;
};

export default NoScript;