UNPKG

@fluentui/react-northstar

Version:
21 lines (20 loc) 1 kB
import { AccessibilityActionHandlers } from '@fluentui/react-bindings'; import * as React from 'react'; import { RenderResultConfig } from './renderComponent'; import { ShorthandFactory } from './factories'; import { ObjectOf } from '../types'; export interface CreateComponentConfig<P> { displayName: string; className?: string; shorthandPropName?: string; defaultProps?: Partial<P>; handledProps?: string[]; propTypes?: React.WeakValidationMap<P>; actionHandlers?: AccessibilityActionHandlers; render: (config: RenderResultConfig<P>, props: P) => React.ReactNode; } export declare type CreateComponentReturnType<P> = React.FunctionComponent<P> & { deprecated_className: string; create: ShorthandFactory<P>; }; export declare const createComponentInternal: <P extends ObjectOf<any> = any>({ displayName, className, shorthandPropName, defaultProps, handledProps, propTypes, actionHandlers, render, }: CreateComponentConfig<P>) => CreateComponentReturnType<P>;