Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion test/integration/vite/src/Home.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Alert } from "@codegouvfr/react-dsfr/Alert";
import { fr } from "@codegouvfr/react-dsfr";
import { useIsDark } from "@codegouvfr/react-dsfr/useIsDark";
import { useIsDark } from "@codegouvfr/react-dsfr";

export function Home() {
const { isDark, setIsDark } = useIsDark();
Expand Down
6 changes: 4 additions & 2 deletions test/integration/vite/src/Mui.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import * as React from "react";
import { MuiDsfrThemeProvider } from "@codegouvfr/react-dsfr/mui";
import { createMuiDsfrThemeProvider } from "@codegouvfr/react-dsfr/mui";
import { ThemeProvider, createTheme } from "@mui/material/styles";
import { useIsDark } from "@codegouvfr/react-dsfr/useIsDark";
import { useIsDark } from "@codegouvfr/react-dsfr";
import TextField from '@mui/material/TextField';
import Autocomplete from '@mui/material/Autocomplete';
import Stack from '@mui/material/Stack';
Expand Down Expand Up @@ -43,6 +43,8 @@ const muiDefaultLightTheme = createTheme({
}
});

const { MuiDsfrThemeProvider } = createMuiDsfrThemeProvider();

export function Mui() {

const { isDark, setIsDark } = useIsDark();
Expand Down
6 changes: 3 additions & 3 deletions test/integration/vite/src/main.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React from "react";
import ReactDOM from "react-dom/client";
import { Home } from "./Home";
import { Mui } from "./Mui";
import { startReactDsfr } from "@codegouvfr/react-dsfr/spa";
import { startReactDsfr } from "@codegouvfr/react-dsfr";
import { Header } from "@codegouvfr/react-dsfr/Header";
import { BrowserRouter } from "react-router-dom";
import { Routes, Route, Link, useLocation } from "react-router-dom";
Expand All @@ -11,7 +11,7 @@ import { fr } from "@codegouvfr/react-dsfr";

startReactDsfr({ "defaultColorScheme": "system", Link });

declare module "@codegouvfr/react-dsfr/spa" {
declare module "@codegouvfr/react-dsfr" {
interface RegisterLink {
Link: typeof Link;
}
Expand All @@ -36,7 +36,7 @@ function Root() {
serviceTitle="Nom du site / service"
homeLinkProps={{ "to": "/", "title": "Accueil - Nom de l’entité (ministère, secrétariat d‘état, gouvernement)" }}
quickAccessItems={[headerFooterDisplayItem]}
navigation={[
navItems={[
{
"text": "Home",
"linkProps": {
Expand Down