UNPKG

@kwiz/fluentui

Version:

KWIZ common controls for FluentUI

32 lines (31 loc) 1.29 kB
import { DropdownProps } from '@fluentui/react-components'; import React from 'react'; type ForwardProps = Omit<DropdownProps, "onSelect" | "selectedOptions" | "clearable">; interface IProps<keyType, dataType> extends ForwardProps { required?: boolean; selected: keyType | keyType[]; items: { key: keyType; value: string; data?: dataType; /** display complex controls in the drop down */ option?: JSX.Element; }[]; onSelect: ( /** the specific option that was selected/unselected */ option: { key: keyType; value: string; data?: dataType; }, /** only sent for multi select - all selected options, in case of multi select */ options?: { key: keyType; value: string; data?: dataType; }[]) => void; } export declare const DropdownEX: <keyType extends string = string, dataType = never>(props: IProps<keyType, dataType> & React.RefAttributes<HTMLButtonElement>) => React.JSX.Element | null; /** @deprecated use normal DropdownEX it is now generic */ export declare function getDropdownEX<keyType extends string = string, dataType = never>(): (props: IProps<keyType, dataType> & React.RefAttributes<HTMLButtonElement>) => React.JSX.Element | null; export {};