UNPKG

@fluentui/react-northstar

Version:
13 lines (12 loc) 894 B
import * as React from 'react'; import { Props, PropsOf, InstanceOf } from 'src/types'; export declare type ShorthandTestOptions<TProps = any> = { mapsValueToProp?: keyof (TProps & React.HTMLProps<HTMLElement>) | false; implementsPopper?: boolean; requiredProps?: Props; requiredShorthandProps?: Props; }; export declare const DefaultShorthandTestOptions: ShorthandTestOptions; export declare type ShorthandPropTestsRunner<TComponent> = <TShorthandComponent extends React.ComponentType>(shorthandProp: keyof PropsOf<InstanceOf<TComponent>>, ShorthandComponent: TShorthandComponent, options?: ShorthandTestOptions<PropsOf<TShorthandComponent>>) => any; export declare type ShorthandPropTestsFactory = <TComponent extends React.ComponentType>(Component: TComponent) => ShorthandPropTestsRunner<TComponent>; export declare const implementsShorthandProp: ShorthandPropTestsFactory;