Skip to content

Commit

Permalink
fix as suggested
Browse files Browse the repository at this point in the history
  • Loading branch information
siriwatknp committed Jul 17, 2024
1 parent 9dbf8b7 commit b8b95ea
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ To toggle between modes manually, set the `colorSchemeSelector` with one of the
```js class
extendTheme({
colorSchemes: { light: true, dark: true },
colorSchemeSelector: 'class' }
);
colorSchemeSelector: 'class'
});

// CSS Result
.light { ... }
Expand All @@ -42,8 +42,8 @@ extendTheme({
```js data
extendTheme({
colorSchemes: { light: true, dark: true },
colorSchemeSelector: 'data' }
);
colorSchemeSelector: 'data'
});

// CSS Result
[data-light] { ... }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ function App() {

</codeblock>

If you want to customize the selector instead of using `prefers-color-scheme`, check out the [advanced configuration](/material-ui/customization/css-theme-variables/configuration/#advanced-configuration).
If you want to manually toggle the color scheme, check out the [advanced configuration](/material-ui/customization/css-theme-variables/configuration/#advanced-configuration).

## Applying dark styles

Expand Down
2 changes: 1 addition & 1 deletion docs/public/static/error-codes.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@
"21": "MUI: The provided shorthand %s is invalid. The format should be `@<breakpoint | number>` or `@<breakpoint | number>/<container>`.\nFor example, `@sm` or `@600` or `@40rem/sidebar`.",
"22": "MUI: Missing or invalid value of `colorSchemes.%s` from the `extendTheme` function.",
"23": "MUI: The provided `colorSchemes.%s` to the `extendTheme` function is either missing or invalid."
}
}
1 change: 0 additions & 1 deletion packages/mui-material/src/styles/extendTheme.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import { createRenderer } from '@mui/internal-test-utils';
import Button from '@mui/material/Button';
import { CssVarsProvider, extendTheme } from '@mui/material/styles';
import { deepOrange, green } from '@mui/material/colors';
import { colors } from '..';

describe('extendTheme', () => {
let originalMatchmedia;
Expand Down

0 comments on commit b8b95ea

Please sign in to comment.