UNPKG

@fluentui/react-northstar

Version:
22 lines (21 loc) 979 B
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>;