File tree Expand file tree Collapse file tree 7 files changed +591
-42
lines changed Expand file tree Collapse file tree 7 files changed +591
-42
lines changed Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ export type { SpacingToken } from "./spacing";
88import { cx } from "./cx" ;
99export type { FrCxArg } from "./cx" ;
1010export { DsfrLangProvider } from "./i18n" ;
11- export { createLinkProvider } from "./routing" ;
11+ export { createDsfrLinkProvider } from "./routing" ;
1212export type { LinkProps , HTMLAnchorProps } from "./routing" ;
1313
1414export const fr = {
Original file line number Diff line number Diff line change @@ -17,23 +17,23 @@ export type HTMLAnchorProps = DetailedHTMLProps<
1717const context = createContext < CreateLinkProviderPrams [ "Link" ] > ( props => < a { ...props } /> ) ;
1818
1919type CreateLinkProviderPrams = {
20- Link : ( props : LinkProps ) => JSX . Element ;
20+ Link : ( props : LinkProps ) => ReturnType < React . FC > ;
2121} ;
2222
23- export function createLinkProvider ( params : CreateLinkProviderPrams ) {
23+ export function createDsfrLinkProvider ( params : CreateLinkProviderPrams ) {
2424 const { Link } = params ;
2525
2626 type Props = {
2727 children : ReactNode ;
2828 } ;
2929
30- function LinkProvider ( props : Props ) {
30+ function DsfrLinkProvider ( props : Props ) {
3131 const { children } = props ;
3232
3333 return < context . Provider value = { Link } > { children } </ context . Provider > ;
3434 }
3535
36- return { LinkProvider } ;
36+ return { DsfrLinkProvider } ;
3737}
3838
3939export function useLink ( ) {
Original file line number Diff line number Diff line change 1414 },
1515 "dependencies" : {
1616 "react" : " 18.2.0" ,
17- "react-dom" : " 18.2.0" ,
17+ "react-dom" : " 18.2.0" ,
18+ "react-router-dom" : " ^6.4.3" ,
19+ "@mui/x-date-pickers" : " ^5.0.9" ,
20+ "@mui/icons-material" : " ^5.10.16" ,
21+ "dayjs" : " ^1.11.6" ,
1822 "@codegouvfr/react-dsfr" : " file:../../../dist"
1923 },
2024 "devDependencies" : {
2428 "typescript" : " ^4.6.4" ,
2529 "vite" : " ^3.1.0"
2630 }
27- }
31+ }
Original file line number Diff line number Diff line change 1- import { Header } from "@codegouvfr/react-dsfr/Header" ;
21import { Alert } from "@codegouvfr/react-dsfr/Alert" ;
32import { useIsDark , fr } from "@codegouvfr/react-dsfr" ;
43import { DarkModeSwitch } from "@codegouvfr/react-dsfr/DarkModeSwitch" ;
54
6- export function App ( ) {
5+ export function Home ( ) {
76 const { isDark, setIsDark } = useIsDark ( ) ;
87
98 return (
109 < >
11- < Header
12- intituléOfficiel = "Intitulé officiel"
13- baselinePrécisionsSurLorganisation = "baseline - Précision sur l'organisation"
14- nomDuSiteSlashService = "Nom du site / service"
15- links = { [
16- {
17- "text" : "Créer un espace" ,
18- "iconId" : "fr-icon-add-circle-line" ,
19- "href" : "#"
20- } ,
21- {
22- "text" : "Se connecter" ,
23- "iconId" : "fr-icon-lock-line" ,
24- "href" : "#"
25- } ,
26- {
27- "text" : "S'enregistrer" ,
28- "iconId" : "fr-icon-account-line" ,
29- "href" : "#"
30- }
31- ] }
32- />
3310
3411 < Alert
3512 isClosable = { true }
You can’t perform that action at this time.
0 commit comments