UNPKG

930 BTypeScriptView Raw
1import { CssVarsThemeOptions } from './createThemeWithVars';
2import { Theme, ThemeOptions } from './createThemeNoVars';
3export { createMuiTheme } from './createThemeNoVars';
4export type { ThemeOptions, Theme, CssThemeVariables } from './createThemeNoVars';
5/**
6 * Generate a theme base on the options received.
7 * @param options Takes an incomplete theme object and adds the missing parts.
8 * @param args Deep merge the arguments with the about to be returned theme.
9 * @returns A complete, ready-to-use theme object.
10 */
11export default function createTheme(options?: Omit<ThemeOptions, 'components'> & Pick<CssVarsThemeOptions, 'defaultColorScheme' | 'colorSchemes' | 'components'> & {
12 cssVariables?: boolean | Pick<CssVarsThemeOptions, 'colorSchemeSelector' | 'rootSelector' | 'disableCssColorScheme' | 'cssVarPrefix' | 'shouldSkipGeneratingVar'>;
13}, // cast type to skip module augmentation test
14...args: object[]): Theme;