This repository has been archived by the owner on Apr 5, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
13 changed files
with
173 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,7 @@ | ||
{ | ||
"extends": ["next/core-web-vitals", "plugin:storybook/recommended"] | ||
"extends": [ | ||
"next/core-web-vitals", | ||
"plugin:storybook/recommended", | ||
"plugin:jsx-a11y/recommended" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,35 +1,59 @@ | ||
import { FooterBottom, FooterCopy, FooterLink } from "@dataesr/react-dsfr"; | ||
import { | ||
FooterBottom, | ||
FooterCopy, | ||
FooterLink, | ||
SwitchTheme, | ||
} from "@dataesr/react-dsfr"; | ||
import { useState } from "react"; | ||
import { FooterBottomSectionProps } from "./type"; | ||
|
||
export const Bottom = (props: FooterBottomSectionProps): JSX.Element => ( | ||
<FooterBottom> | ||
{props.links.map((link, index) => ( | ||
<FooterLink key={`${index}-${link.title}`} href={link.href}> | ||
{link.title} | ||
</FooterLink> | ||
))} | ||
<FooterCopy> | ||
<p> | ||
Sauf mention contraire, tous les contenus de ce site sont sous{" "} | ||
<a | ||
href="https://github.com/etalab/licence-ouverte/blob/master/LO.md" | ||
rel="noreferrer" | ||
target="_blank" | ||
> | ||
licence etalab-2.0 | ||
</a> | ||
</p> | ||
<p> | ||
Version {props.version} ( | ||
<a | ||
target="_blank" | ||
href={`${props.repositoryUrl}/tree/${props.commitHash}`} | ||
rel="noreferrer" | ||
> | ||
{props.commitHash.substring(0, 8)} | ||
</a> | ||
) | ||
</p> | ||
</FooterCopy> | ||
</FooterBottom> | ||
); | ||
export const Bottom = (props: FooterBottomSectionProps): JSX.Element => { | ||
const [isOpen, setIsOpen] = useState(false); | ||
|
||
return ( | ||
<FooterBottom> | ||
{props.links.map((link, index) => ( | ||
<FooterLink key={`${index}-${link.title}`} href={link.href}> | ||
{link.title} | ||
</FooterLink> | ||
))} | ||
{props.hasSwitchMode && ( | ||
<FooterLink onClick={() => setIsOpen(true)} href="/"> | ||
<span | ||
className="fr-fi-theme-fill fr-link--icon-left" | ||
aria-controls="fr-theme-modal" | ||
data-fr-opened={isOpen} | ||
> | ||
Paramètres d’affichage | ||
</span> | ||
</FooterLink> | ||
)} | ||
<FooterCopy> | ||
<p> | ||
Sauf mention contraire, tous les contenus de ce site sont sous{" "} | ||
<a | ||
href="https://github.com/etalab/licence-ouverte/blob/master/LO.md" | ||
rel="noreferrer" | ||
target="_blank" | ||
> | ||
licence etalab-2.0 | ||
</a> | ||
</p> | ||
<p> | ||
Version {props.version} ( | ||
<a | ||
target="_blank" | ||
href={`${props.repositoryUrl}/tree/${props.commitHash}`} | ||
rel="noreferrer" | ||
> | ||
{props.commitHash.substring(0, 8)} | ||
</a> | ||
) | ||
</p> | ||
</FooterCopy> | ||
{props.hasSwitchMode && ( | ||
<SwitchTheme isOpen={isOpen} setIsOpen={setIsOpen} /> | ||
)} | ||
</FooterBottom> | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import React from "react"; | ||
import { ComponentStory, ComponentMeta } from "@storybook/react"; | ||
|
||
import { Head } from "./head"; | ||
|
||
export default { | ||
title: "Header", | ||
component: Head, | ||
} as ComponentMeta<typeof Head>; | ||
|
||
const Template: ComponentStory<typeof Head> = args => <Head {...args} />; | ||
|
||
export const Default = Template.bind({}); | ||
Default.args = { | ||
title: "Random title", | ||
textLead: "Random text lead", | ||
description: "Random description", | ||
image: { | ||
src: "https://via.placeholder.com/600x400", | ||
alt: "Random image", | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import React from "react"; | ||
import { ComponentStory, ComponentMeta } from "@storybook/react"; | ||
import { Testimonial } from "./testimonial"; | ||
|
||
export default { | ||
title: "Testimonial", | ||
component: Testimonial, | ||
} as ComponentMeta<typeof Testimonial>; | ||
|
||
const Template: ComponentStory<typeof Testimonial> = args => ( | ||
<Testimonial {...args} /> | ||
); | ||
|
||
export const Default = Template.bind({}); | ||
Default.args = { | ||
description: "Random description", | ||
image: { | ||
src: "https://via.placeholder.com/600x400", | ||
alt: "Random image", | ||
}, | ||
link: { | ||
href: "https://www.google.com", | ||
title: "Random link", | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import React from "react"; | ||
import { ComponentStory, ComponentMeta } from "@storybook/react"; | ||
import { Testimonial } from "./testimonial"; | ||
import { Tile } from "./tile"; | ||
|
||
export default { | ||
title: "Tile", | ||
component: Tile, | ||
} as ComponentMeta<typeof Tile>; | ||
|
||
const Template: ComponentStory<typeof Tile> = args => <Tile {...args} />; | ||
|
||
export const Default = Template.bind({}); | ||
Default.args = { | ||
title: "Random title", | ||
description: "Random description", | ||
image: { | ||
src: "https://via.placeholder.com/600x400", | ||
alt: "Random image", | ||
}, | ||
href: "https://www.fabrique.social.gouv.fr/", | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters