@kubit-ui-web/react-components
Version:
Kubit React Components is a customizable, accessible library of React web components, designed to enhance your application's user experience
39 lines (37 loc) • 1.57 kB
TypeScript
import React from 'react';
import { CSSProp, DefaultTheme } from 'styled-components';
import { GenericComponentsType } from '../genericComponents/genericComponents.type';
import { ThemeInformation } from '../themeInformation/themeInformation.type';
interface IThemeProvider {
children?: React.ReactNode;
styles: DefaultTheme;
genericComponents: GenericComponentsType;
country?: string;
regex?: unknown;
customGlobalStyles?: CSSProp;
themeInformation: ThemeInformation;
customFonts?: CSSProp;
showErrors?: boolean;
idCreateModal?: string | null;
customFallback?: JSX.Element;
}
/**
* @name ThemeProvider
* @description
* ThemeProvider is a wrapper component that provides the theme to all components in its subtree via the context API.
* It should be used once at the root of your React component tree.
* @example
* <ThemeProvider styles={theme}>
* <App />
* </ThemeProvider>
* @param {React.ReactNode} children - React children
* @param {DefaultTheme} styles - Theme object
* @param {GenericComponentsType} genericComponents - Generic components
* @param {string} country - Country
* @param {unknown} regex - Regex
* @param {CSSProp} customGlobalStyles - Custom global styles
* @param {ThemeInformation} themeInformation - Theme information
* @returns {JSX.Element} - ThemeProvider component
*/
export declare const ThemeProvider: ({ children, styles, customGlobalStyles, genericComponents, themeInformation, customFonts, showErrors, idCreateModal, customFallback, }: IThemeProvider) => JSX.Element;
export {};