Skip to content

Commit a6b1043

Browse files
committed
feat(footer): add the possibility to add a component above link list
1 parent 2c92ca2 commit a6b1043

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

src/Footer.tsx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,10 @@ export type FooterProps = {
7474
>;
7575
style?: CSSProperties;
7676
linkList?: FooterProps.LinkList.List;
77+
/**
78+
* Display a title above the link list, needs linkList to be provided
79+
*/
80+
linkListTitle?: ReactNode;
7781
domains?: string[];
7882
};
7983

@@ -167,6 +171,7 @@ export const Footer = memo(
167171
homeLinkProps: homeLinkProps_prop,
168172
style,
169173
linkList,
174+
linkListTitle,
170175
domains = ["info.gouv.fr", "service-public.fr", "legifrance.gouv.fr", "data.gouv.fr"],
171176
...rest
172177
} = props;
@@ -213,6 +218,7 @@ export const Footer = memo(
213218
{linkList !== undefined && (
214219
<div className={fr.cx("fr-footer__top")}>
215220
<div className={fr.cx("fr-container")}>
221+
{linkListTitle}
216222
<div
217223
className={fr.cx(
218224
"fr-grid-row",

stories/Footer.stories.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -246,5 +246,6 @@ export const WithLinkList = getStory({
246246
Retrouvez toutes les informations et démarches administratives nécessaires à la création,
247247
à la gestion et au développement de votre entreprise.
248248
`,
249-
linkList
249+
linkList,
250+
linkListTitle: <h2>Liens utiles</h2>
250251
});

0 commit comments

Comments
 (0)