Skip to content

Commit

Permalink
fix warning
Browse files Browse the repository at this point in the history
  • Loading branch information
siriwatknp committed Sep 16, 2024
1 parent a264ddc commit d9378b9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -384,7 +384,7 @@ describe('[Material UI] ThemeProviderWithVars', () => {
expect(() => {
fireEvent.click(screen.getByText('Dark'));
}).toErrorDev([
'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',
'MUI: The `setMode` function has no effect if `colorSchemeSelector` is not configured.\nTo toggle the mode manually, please configure `colorSchemeSelector` to use a class or data attribute.\nTo learn more, visit https://mui.com/material-ui/customization/css-theme-variables/configuration/#toggling-dark-mode-manually',
]);
});
});
2 changes: 1 addition & 1 deletion packages/mui-system/src/cssVars/createCssVarsProvider.js
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ export default function createCssVarsProvider(options) {
console.error(
[
'MUI: The `setMode` function has no effect if `colorSchemeSelector` is not configured.',
'Please create a theme with `createTheme({ cssVariables: { colorSchemeSelector: "class" | "data" } })`.',
'To toggle the mode manually, please configure `colorSchemeSelector` to use a class or data attribute.',
'To learn more, visit https://mui.com/material-ui/customization/css-theme-variables/configuration/#toggling-dark-mode-manually',
].join('\n'),
);
Expand Down

0 comments on commit d9378b9

Please sign in to comment.