@fluentui/react-northstar
Version:
A themable React component library.
22 lines (21 loc) • 979 B
TypeScript
import { ComponentSlotClasses, ReactAccessibilityBehavior, AccessibilityActionHandlers } from '@fluentui/react-bindings';
import { ComponentSlotStylesResolved } from '@fluentui/styles';
import * as React from 'react';
import { CreateComponentReturnType } from './createComponentInternal';
import { ObjectOf } from '../types';
export interface CreateComponentRenderConfig {
accessibility: ReactAccessibilityBehavior;
classes: ComponentSlotClasses;
rtl: boolean;
styles: ComponentSlotStylesResolved;
}
export interface CreateComponentConfig<P> {
displayName: string;
className?: string;
render: (props: P & {
config: CreateComponentRenderConfig;
}) => React.ReactNode;
defaultProps?: any;
actionHandlers?: AccessibilityActionHandlers;
}
export declare const createComponent: <P extends ObjectOf<any> = any>({ displayName, className, render, defaultProps, actionHandlers, }: CreateComponentConfig<P>) => CreateComponentReturnType<P>;