UNPKG

@worktif/purei

Version:

Work TIF Material UI Theme Provider and Customization Suite for React applications with dark mode support and dynamic color schemes

21 lines (20 loc) 1.27 kB
import * as React from 'react'; import { Components, CssVarsTheme, CssVarsThemeOptions, Theme, ThemeOptions } from '@mui/material/styles'; type Props = { children: any; disableCustomTheme?: boolean; defaultTheme?: Omit<ThemeOptions, 'components'> & Pick<CssVarsThemeOptions, 'defaultColorScheme' | 'colorSchemes' | 'components'>; themeComponents?: Components<Omit<Theme, 'components' | 'palette'> & CssVarsTheme>; }; /** * A functional component that provides a theme context for its children. * It conditionally applies a custom theme or defaults to no theme based on the provided props. * * @param {Object} props - The properties object. * @param {React.ReactNode} props.children - The child components or elements to which the theme context will be applied. * @param {boolean} props.disableCustomTheme - Determines whether the custom theme is disabled. If true, the default theme is used. * @param {Object} props.themeComponents - Custom theme components or overrides to be merged into the theme configuration. * @return {JSX.Element} A JSX.Element wrapping the children with or without a custom theme. */ export declare function AppTheme({ children, disableCustomTheme, defaultTheme, themeComponents }: Props): React.JSX.Element; export {};