Skip to content

Commit 2c92ca2

Browse files
committed
Small fix on Mui provider
1 parent 4c053ac commit 2c92ca2

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/mui.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import { spacingTokenByValue } from "./fr/generatedFromCss/spacing";
1212
import { assert } from "tsafe/assert";
1313
import { objectKeys } from "tsafe/objectKeys";
1414
import { id } from "tsafe/id";
15-
import { useBreakpointsValues, type BreakpointsValues } from "./useBreakpointsValues";
15+
import { useBreakpointsValuesPx, type BreakpointsValues } from "./useBreakpointsValuesPx";
1616

1717
export function getMuiDsfrThemeOptions(params: {
1818
isDark: boolean;
@@ -365,7 +365,7 @@ export function createMuiDsfrThemeProvider(params: {
365365

366366
const { isDark } = useIsDark_props();
367367

368-
const { breakpointsValues } = useBreakpointsValues();
368+
const { breakpointsValues } = useBreakpointsValuesPx();
369369

370370
const theme = useMemo(() => {
371371
const nonAugmentedMuiTheme = createMuiDsfrTheme({ isDark, breakpointsValues });
@@ -376,7 +376,7 @@ export function createMuiDsfrThemeProvider(params: {
376376
nonAugmentedMuiTheme,
377377
isDark
378378
});
379-
}, [isDark]);
379+
}, [isDark, breakpointsValues]);
380380

381381
return <MuiThemeProvider theme={theme}>{children}</MuiThemeProvider>;
382382
}

0 commit comments

Comments
 (0)