UNPKG

@material-ui/core

Version:

Quickly build beautiful React apps. Material-UI is a simple and customizable component library to build faster, beautiful, and more accessible React applications. Follow your own design system, or start with Material Design.

45 lines (40 loc) 1.59 kB
import { ThemeOptions as SystemThemeOptions, Theme as SystemTheme } from '@material-ui/system'; import { Mixins, MixinsOptions } from './createMixins'; import { Palette, PaletteOptions } from './createPalette'; import { Typography, TypographyOptions } from './createTypography'; import { Shadows } from './shadows'; import { Transitions, TransitionsOptions } from './createTransitions'; import { ZIndex, ZIndexOptions } from './zIndex'; import { Components } from './components'; export interface ThemeOptions extends SystemThemeOptions { mixins?: MixinsOptions; components?: Components; palette?: PaletteOptions; shadows?: Shadows; transitions?: TransitionsOptions; typography?: TypographyOptions | ((palette: Palette) => TypographyOptions); zIndex?: ZIndexOptions; unstable_strictMode?: boolean; } export interface Theme extends SystemTheme { mixins: Mixins; components?: Components; palette: Palette; shadows: Shadows; transitions: Transitions; typography: Typography; zIndex: ZIndex; unstable_strictMode?: boolean; } /** * @deprecated * Use `import { createTheme } from '@material-ui/core/styles'` instead. */ export function createMuiTheme(options?: ThemeOptions, ...args: object[]): Theme; /** * Generate a theme base on the options received. * @param options Takes an incomplete theme object and adds the missing parts. * @param args Deep merge the arguments with the about to be returned theme. * @returns A complete, ready to use theme object. */ export default function createTheme(options?: ThemeOptions, ...args: object[]): Theme;