@fluentui/react-northstar
Version:
A themable React component library.
21 lines (20 loc) • 1 kB
TypeScript
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>;