aboutsummaryrefslogtreecommitdiffstats
path: root/src/components/molecules/layout/page-header.tsx
diff options
context:
space:
mode:
authorArmand Philippot <git@armandphilippot.com>2023-10-10 19:37:51 +0200
committerArmand Philippot <git@armandphilippot.com>2023-11-11 18:14:41 +0100
commitc87c615b5866b8a8f361eeb0764bfdea85740e90 (patch)
treec27bda05fd96bbe3154472e170ba1abd5f9ea499 /src/components/molecules/layout/page-header.tsx
parent15522ec9146f6f1956620355c44dea2a6a75b67c (diff)
refactor(components): replace Meta component with MetaList
It removes items complexity by allowing consumers to use any label/value association. Translations should also be defined by the consumer. Each item can now be configured separately (borders, layout...).
Diffstat (limited to 'src/components/molecules/layout/page-header.tsx')
-rw-r--r--src/components/molecules/layout/page-header.tsx6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/components/molecules/layout/page-header.tsx b/src/components/molecules/layout/page-header.tsx
index b727cc1..ea0dd2c 100644
--- a/src/components/molecules/layout/page-header.tsx
+++ b/src/components/molecules/layout/page-header.tsx
@@ -1,6 +1,6 @@
import type { FC, ReactNode } from 'react';
import { Header, Heading } from '../../atoms';
-import { Meta, type MetaData } from './meta';
+import { MetaList, type MetaItemData } from '../meta-list';
import styles from './page-header.module.scss';
export type PageHeaderProps = {
@@ -15,7 +15,7 @@ export type PageHeaderProps = {
/**
* The page metadata.
*/
- meta?: MetaData;
+ meta?: MetaItemData[];
/**
* The page title.
*/
@@ -56,7 +56,7 @@ export const PageHeader: FC<PageHeaderProps> = ({
{title}
</Heading>
{meta ? (
- <Meta className={styles.meta} data={meta} isInline spacing="xs" />
+ <MetaList className={styles.meta} hasInlinedItems items={meta} />
) : null}
{intro ? getIntro() : null}
</div>