import * as React from 'react'; export declare type ConfigurationOverrideFunction = (a: any) => any | undefined | null; export declare type ConfigurationOverrideObject = { [k: string]: any; }; export declare type ConfigurationOverride = ConfigurationOverrideObject | ConfigurationOverrideFunction; export declare type StyleOverride = ConfigurationOverride; export declare type OverrideObject = { component?: React.ComponentType | null; props?: ConfigurationOverride | null; style?: ConfigurationOverride | null; }; export declare type Override = OverrideObject | (React.ComponentType & { component?: undefined; props?: undefined; style?: undefined; }); export declare type Overrides = { [x: string]: Override; }; /** * Given an override argument, returns the component implementation override if it exists */ export declare function getOverride(_override: any): any; /** * Given an override argument, returns the override props that should be passed * to the component when rendering it. */ export declare function getOverrideProps(_override?: Override | null): T; /** * Coerces an override argument into an override object * (sometimes it is just an override component) */ export declare function toObjectOverride(_override?: Override): OverrideObject; /** * Get a convenient override array that will always have [component, props] */ export declare function getOverrides(_override: any, defaultComponent: React.ComponentType): [React.ComponentType, T]; /** * Merges two overrides objects – this is useful if you want to inject your own * overrides into a child component, but also accept further overrides from * from upstream. See `mergeOverride` below. */ export declare function mergeConfigurationOverrides(target: ConfigurationOverride, source: ConfigurationOverride): ConfigurationOverride; export declare function mergeOverride(target: OverrideObject, source: OverrideObject): OverrideObject; export declare function mergeOverrides(target?: Overrides, source?: Overrides): Overrides; /** * Merges two override objects using the following behavior: * - Component implementation from the source (parent) replaces target * - Props and styles are both deep merged */ /** * Since style or props overrides can be an object *or* a function, we need to handle * the case that one of them is a function. We do this by returning a new * function that deep merges the result of each style override */ export declare function useOverrides(defaults: { [x: string]: React.ComponentType; }, overrides?: Overrides): { [x: string]: [React.ComponentType, {}]; };