Skip to content

Commit 5db0be2

Browse files
committed
Add footer to Vite demo setup
1 parent 43f08b2 commit 5db0be2

File tree

1 file changed

+20
-2
lines changed

1 file changed

+20
-2
lines changed

test/integration/vite/src/main.tsx

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import { Home } from "./Home";
44
import { Mui } from "./Mui";
55
import { startReactDsfr } from "@codegouvfr/react-dsfr/spa";
66
import { Header } from "@codegouvfr/react-dsfr/Header";
7+
import { Footer } from "@codegouvfr/react-dsfr/Footer";
78
import { BrowserRouter } from "react-router-dom";
89
import { Routes, Route, Link, useLocation } from "react-router-dom";
910
import { Display, headerFooterDisplayItem } from "@codegouvfr/react-dsfr/Display";
@@ -25,16 +26,20 @@ ReactDOM.createRoot(document.getElementById("root") as HTMLElement).render(
2526
</React.StrictMode>
2627
);
2728

29+
const brandTop = <>INTITULE<br />OFFICIEL</>;
30+
31+
const homeLinkProps= { "to": "/", "title": "Accueil - Nom de l’entité (ministère, secrétariat d‘état, gouvernement)" };
32+
2833
function Root() {
2934

3035
const location = useLocation();
3136

3237
return (
3338
<div style={{ "height": "100vh", "display": "flex", "flexDirection": "column" }}>
3439
<Header
35-
brandTop={<>INTITULE<br />OFFICIEL</>}
40+
brandTop={brandTop}
3641
serviceTitle="Nom du site / service"
37-
homeLinkProps={{ "to": "/", "title": "Accueil - Nom de l’entité (ministère, secrétariat d‘état, gouvernement)" }}
42+
homeLinkProps={homeLinkProps}
3843
quickAccessItems={[headerFooterDisplayItem]}
3944
navigation={[
4045
{
@@ -72,6 +77,19 @@ function Root() {
7277
<Route path="*" element={<h1>404</h1>} />
7378
</Routes>
7479
</div>
80+
<Footer
81+
brandTop={brandTop}
82+
accessibility="fully compliant"
83+
contentDescription={`
84+
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor
85+
incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
86+
quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
87+
Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore
88+
eu fugiat nulla pariatur.
89+
`}
90+
homeLinkProps={homeLinkProps}
91+
bottomItems={[headerFooterDisplayItem]}
92+
/>
7593
<Display />
7694
</div>
7795

0 commit comments

Comments
 (0)