UNPKG

@chief-editor/ui

Version:

UI Component for chief editor

13 lines (12 loc) 509 B
import { IOptionData } from '@rc-hooks/select'; import { UnionOmit } from '@co-hooks/util'; import { HTMLAttributes, ReactNode } from 'react'; export interface ISelectOption<T> { value: T; label: string; readonly?: boolean; disabled?: boolean; children?: ReactNode | ((data: IOptionData<T>) => ReactNode); } export declare type SelectOptionProps<T> = UnionOmit<ISelectOption<T>, HTMLAttributes<HTMLDivElement>>; export declare function Option<T>(props: SelectOptionProps<T>): JSX.Element;