import React from 'react'; export interface IOverridableProps { accountId?: string; forwardedRef?: React.Ref; OriginalComponent?: React.ComponentClass; } /** * Enables this component to be overriden by some other component. * * This is a Class Decorator which should be applied to a React Component Class. * * When rendered, the component will first check if an overriding component is registered using the same key. * If yes, the overriding component is rendered. * If no, the decorated component itself is rendered. * * @Overridable('overrideKey') * class MyCmp extends React.Component { * render() { return

Overridable Component

} * } * * When using the component, just render it as usual: * * * If the override is cloud provider specific, pass the accountId as a prop: * */ export declare function Overridable(key: string): >(targetComponent: T) => T; /** * A high order component which returns a delegating component. * The component will delegate to the overriding component registered with OverrideRegistry or CloudProviderRegistry. * If no override is registered, it delegates to the component being decorated. * * class MyCmp extends React.Component { * render() { return

Overridable Component

* } * * export const MyOverridableCmp = overridableComponent(MyCmp); */ export declare function overridableComponent

>(OriginalComponent: T, key: string): T;