aboutsummaryrefslogtreecommitdiffstats
path: root/src/components/molecules/layout/page-header.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/molecules/layout/page-header.tsx')
-rw-r--r--src/components/molecules/layout/page-header.tsx62
1 files changed, 0 insertions, 62 deletions
diff --git a/src/components/molecules/layout/page-header.tsx b/src/components/molecules/layout/page-header.tsx
deleted file mode 100644
index e70d66c..0000000
--- a/src/components/molecules/layout/page-header.tsx
+++ /dev/null
@@ -1,62 +0,0 @@
-import type { FC, ReactNode } from 'react';
-import { Header, Heading } from '../../atoms';
-import styles from './page-header.module.scss';
-
-export type PageHeaderProps = {
- /**
- * Set additional classnames to the header element.
- */
- className?: string;
- /**
- * The page introduction.
- */
- intro?: string | ReactNode;
- /**
- * The page metadata.
- */
- meta?: ReactNode;
- /**
- * The page title.
- */
- title: ReactNode;
-};
-
-/**
- * PageHeader component
- *
- * Render a header element with page title, meta and intro.
- */
-export const PageHeader: FC<PageHeaderProps> = ({
- className = '',
- intro,
- meta,
- title,
-}) => {
- const headerClass = `${styles.wrapper} ${className}`;
-
- const getIntro = () => {
- if (typeof intro === 'string')
- return (
- <div
- className={styles.intro}
- /* eslint-disable-next-line react/no-danger -- Not safe but intro can
- * contains links or formatting so we need it. */
- dangerouslySetInnerHTML={{ __html: intro }}
- />
- );
-
- return <div className={styles.intro}>{intro}</div>;
- };
-
- return (
- <Header className={headerClass}>
- <div className={styles.body}>
- <Heading className={styles.title} level={1}>
- {title}
- </Heading>
- {meta}
- {intro ? getIntro() : null}
- </div>
- </Header>
- );
-};