@asphalt-react/theme-provider
Version:
Theme provider for Asphalt React
32 lines (28 loc) • 789 B
TypeScript
type Override<T, U> = Omit<U, keyof T> & T
interface ThemeProviderProps {
/**
* React node or node tree to apply theme to.
*/
children: React.ReactNode
/**
* Asphalt Theme object.
*/
theme?: object
/**
* Html element/React component to render as container.
*/
as?: React.ElementType
/**
* Wrap children with a container element.
* Set to false to apply globally.
*/
wrap?: boolean
/**
* Enables responsive theming. When true, theme will include mobile or desktop media queries if mobile or desktop keys are present in the theme object.
*/
responsive?: boolean
}
declare function ThemeProvider(
props: Override<ThemeProviderProps, React.HTMLAttributes<HTMLElement>>
): JSX.Element
export { ThemeProvider, type ThemeProviderProps };