New source found from dndbeyond.com
This commit is contained in:
+4
-1
@@ -20,7 +20,10 @@ function createTheme(options = {}, ...args) {
|
||||
typography: typographyInput = {}
|
||||
} = options,
|
||||
other = _objectWithoutPropertiesLoose(options, _excluded);
|
||||
if (options.vars) {
|
||||
if (options.vars &&
|
||||
// The error should throw only for the root theme creation because user is not allowed to use a custom node `vars`.
|
||||
// `generateCssVars` is the closest identifier for checking that the `options` is a result of `extendTheme` with CSS variables so that user can create new theme for nested ThemeProvider.
|
||||
options.generateCssVars === undefined) {
|
||||
throw new Error(process.env.NODE_ENV !== "production" ? `MUI: \`vars\` is a private field used for CSS variables support.
|
||||
Please use another name.` : _formatMuiErrorMessage(18));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user