diff options
| author | Armand Philippot <git@armandphilippot.com> | 2023-10-10 19:37:51 +0200 |
|---|---|---|
| committer | Armand Philippot <git@armandphilippot.com> | 2023-11-11 18:14:41 +0100 |
| commit | c87c615b5866b8a8f361eeb0764bfdea85740e90 (patch) | |
| tree | c27bda05fd96bbe3154472e170ba1abd5f9ea499 /src/components/molecules/layout/page-footer.tsx | |
| parent | 15522ec9146f6f1956620355c44dea2a6a75b67c (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-footer.tsx')
| -rw-r--r-- | src/components/molecules/layout/page-footer.tsx | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/components/molecules/layout/page-footer.tsx b/src/components/molecules/layout/page-footer.tsx index 375cbc4..a93fced 100644 --- a/src/components/molecules/layout/page-footer.tsx +++ b/src/components/molecules/layout/page-footer.tsx @@ -1,12 +1,12 @@ import type { FC } from 'react'; import { Footer, type FooterProps } from '../../atoms'; -import { Meta, type MetaData } from './meta'; +import { MetaList, type MetaItemData } from '../meta-list'; export type PageFooterProps = Omit<FooterProps, 'children'> & { /** * The footer metadata. */ - meta?: MetaData; + meta?: MetaItemData[]; }; /** @@ -15,5 +15,7 @@ export type PageFooterProps = Omit<FooterProps, 'children'> & { * Render a footer to display page meta. */ export const PageFooter: FC<PageFooterProps> = ({ meta, ...props }) => ( - <Footer {...props}>{meta ? <Meta data={meta} /> : null}</Footer> + <Footer {...props}> + {meta ? <MetaList hasInlinedValues items={meta} /> : null} + </Footer> ); |
