import * as React from 'react'; import { IStyleSet, IStyleFunctionOrObject } from '@uifabric/merge-styles'; export interface IPropsWithStyles> { styles?: IStyleFunctionOrObject; } export interface ICustomizableProps { /** * Name of scope, which can be targeted using the Customizer. */ scope: string; /** * List of fields which can be customized. * @defaultvalue [ 'theme', 'styles' ] */ fields?: string[]; } export declare type StyleFunction = IStyleFunctionOrObject & { /** Cache for all style functions. */ __cachedInputs__: (IStyleFunctionOrObject | undefined)[]; /** True if no styles prop or styles from Customizer is passed to wrapped component. */ __noStyleOverride__: boolean; }; /** * The styled HOC wrapper allows you to create a functional wrapper around a given component which will resolve * getStyles functional props, and mix customized props passed in using concatStyleSets. * * @example * ```tsx * export const Toggle = styled( * ToggleBase, * props => ({ root: { background: 'red' }}) * ); * ``` * @param Component - The unstyled base component to render, which receives styles. * @param baseStyles - The styles which should be curried with the component. * @param getProps - A helper which provides default props. * @param customizable - An object which defines which props can be customized using the Customizer. * @param pure - A boolean indicating if the component should avoid re-rendering when props haven't changed. * Note that pure should not be used on components which allow children, or take in complex objects or * arrays as props which could mutate on every render. */ export declare function styled, TStyleProps, TStyleSet extends IStyleSet>(Component: React.ComponentClass | React.FunctionComponent, baseStyles: IStyleFunctionOrObject, getProps?: (props: TComponentProps) => Partial, customizable?: ICustomizableProps, pure?: boolean): React.FunctionComponent; export declare function styled & React.RefAttributes, TStyleProps, TStyleSet extends IStyleSet, TRef = unknown>(Component: React.ComponentClass | React.FunctionComponent, baseStyles: IStyleFunctionOrObject, getProps?: (props: TComponentProps) => Partial, customizable?: ICustomizableProps, pure?: boolean): React.ForwardRefExoticComponent & React.RefAttributes>;