Skip to content

Commit 5174c65

Browse files
committed
fix the warning
1 parent 55309ae commit 5174c65

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

packages/mui-material/src/styles/ThemeProviderWithVars.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -384,7 +384,7 @@ describe('[Material UI] ThemeProviderWithVars', () => {
384384
expect(() => {
385385
fireEvent.click(screen.getByText('Dark'));
386386
}).toErrorDev([
387-
'MUI: The `setMode` function has no effect if `colorSchemeSelector` is not configured.\nPlease set `cssVariables.colorSchemeSelector` to `"class"` or `"data"`.\nTo learn more, visit https://mui.com/material-ui/customization/css-theme-variables/configuration/#toggling-dark-mode-manually',
387+
'MUI: The `setMode` function has no effect if `colorSchemeSelector` is not configured.\nPlease create a theme with `createTheme({ cssVariables: { colorSchemeSelector: "class" | "data" } })`.\nTo learn more, visit https://mui.com/material-ui/customization/css-theme-variables/configuration/#toggling-dark-mode-manually',
388388
]);
389389
});
390390
});

packages/mui-system/src/cssVars/createCssVarsProvider.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@ export default function createCssVarsProvider(options) {
250250
console.error(
251251
[
252252
'MUI: The `setMode` function has no effect if `colorSchemeSelector` is not configured.',
253-
'Please set `cssVariables.colorSchemeSelector` to `"class"` or `"data"`.',
253+
'Please create a theme with `createTheme({ cssVariables: { colorSchemeSelector: "class" | "data" } })`.',
254254
'To learn more, visit https://mui.com/material-ui/customization/css-theme-variables/configuration/#toggling-dark-mode-manually',
255255
].join('\n'),
256256
);

0 commit comments

Comments
 (0)