import PropTypes from "prop-types"; import React from "react"; import type { GenerateClassName, Jss } from "../typings"; import { DefaultTheme } from "./defaultTheme"; export interface SonnatInitializerOptions { /** Sonnat's theme object */ theme?: T; /** * You can disable the generation of the styles with this option. * It can be useful when traversing the React tree outside of the HTML * rendering step on the server. * Let's say you are using react-apollo to extract all * the queries made by the interface server-side - you can significantly speed up the traversal with this prop. */ disableGeneration?: boolean; /** JSS's class name generator. */ generateClassName?: GenerateClassName; /** * By default, the styles are injected last in the element of the page. * As a result, they gain more specificity than any other style sheet. * If you want to override style injection's behaviour, set this prop. */ injectFirst?: boolean; /** JSS's instance. */ jss?: Jss; } interface SonnatInitializerProps extends SonnatInitializerOptions { children: React.ReactNode; } declare const SonnatInitializer: { (props: SonnatInitializerProps): JSX.Element; propTypes: { children: PropTypes.Validator; theme: PropTypes.Requireable; disableGeneration: PropTypes.Requireable; generateClassName: PropTypes.Requireable<(...args: any[]) => any>; injectFirst: PropTypes.Requireable; jss: PropTypes.Requireable; }; }; export default SonnatInitializer;