UNPKG

@ucam/design-system

Version:
44 lines (43 loc) 1.52 kB
import React from 'react'; import { InternalStandardProps as StandardProps, Theme } from '@material-ui/core'; export interface ThemeProviderProps extends StandardProps<React.HTMLAttributes<HTMLDivElement>> { /** * A collection of themes and their names * default: { * "Light": light, * "Dark": dark * } */ themes?: { [themeName: string]: Theme; }; /** * The name of the default (light) theme * default: "Light" */ defaultThemeName?: string; /** * The name of the dark theme * default: "Dark" */ darkThemeName?: string; /** * Store the current theme in local storage, to save it between browser reloads * Note: Uses the same value for the lifetime of the component (cannot be updated) * default: false */ disableLocalStorage?: boolean; /** * Global scoped ThemeProviders apply global styles to the body element * Local scoped ThemeProviders apply global styles to a wrapper div * Unscoped ThemeProviders do not apply any global styles * default: "global" */ scope?: 'global' | 'local' | false; } /** * A component that provides the app with theming support. * Also providing a `<HydrationChecker/>`. */ declare const ThemeProviderWithHydrationChecker: React.ForwardRefExoticComponent<Pick<ThemeProviderProps, string | number> & React.RefAttributes<HTMLDivElement>>; export default ThemeProviderWithHydrationChecker;