aboutsummaryrefslogtreecommitdiffstats
path: root/src/components/molecules/layout/page-footer.tsx
diff options
context:
space:
mode:
authorArmand Philippot <git@armandphilippot.com>2023-11-20 11:02:20 +0100
committerArmand Philippot <git@armandphilippot.com>2023-11-20 19:20:21 +0100
commitd5ade2359539648845a5854ed353b29367961d74 (patch)
tree45a49d90090408887135a971a7fd79c45d9dcd94 /src/components/molecules/layout/page-footer.tsx
parent6ab9635a22d69186c8a24181ad5df7736e288577 (diff)
refactor(components): extract MetaItem from MetaList
* replace `items` prop on MetaList with `children` prop: it was too restrictive and the global options was not really useful. It is better too give control to the consumers.
Diffstat (limited to 'src/components/molecules/layout/page-footer.tsx')
-rw-r--r--src/components/molecules/layout/page-footer.tsx13
1 files changed, 5 insertions, 8 deletions
diff --git a/src/components/molecules/layout/page-footer.tsx b/src/components/molecules/layout/page-footer.tsx
index a93fced..e0ce2ef 100644
--- a/src/components/molecules/layout/page-footer.tsx
+++ b/src/components/molecules/layout/page-footer.tsx
@@ -1,12 +1,11 @@
-import type { FC } from 'react';
+import type { FC, ReactNode } from 'react';
import { Footer, type FooterProps } from '../../atoms';
-import { MetaList, type MetaItemData } from '../meta-list';
export type PageFooterProps = Omit<FooterProps, 'children'> & {
/**
- * The footer metadata.
+ * The footer contents.
*/
- meta?: MetaItemData[];
+ children?: ReactNode;
};
/**
@@ -14,8 +13,6 @@ export type PageFooterProps = Omit<FooterProps, 'children'> & {
*
* Render a footer to display page meta.
*/
-export const PageFooter: FC<PageFooterProps> = ({ meta, ...props }) => (
- <Footer {...props}>
- {meta ? <MetaList hasInlinedValues items={meta} /> : null}
- </Footer>
+export const PageFooter: FC<PageFooterProps> = ({ children, ...props }) => (
+ <Footer {...props}>{children}</Footer>
);