You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
37 lines
1.1 KiB
37 lines
1.1 KiB
import * as React from 'react';
|
|
import { Key } from './generator';
|
|
export declare type RenderDOMFunc = (props: any) => HTMLElement;
|
|
export declare type RenderNode = React.ReactNode | ((props: any) => React.ReactNode);
|
|
export declare type Mode = 'multiple' | 'tags' | 'combobox';
|
|
export interface OptionCoreData {
|
|
key?: Key;
|
|
disabled?: boolean;
|
|
value: Key;
|
|
title?: string;
|
|
className?: string;
|
|
style?: React.CSSProperties;
|
|
label?: React.ReactNode;
|
|
/** @deprecated Only works when use `children` as option data */
|
|
children?: React.ReactNode;
|
|
}
|
|
export interface OptionData extends OptionCoreData {
|
|
/** Save for customize data */
|
|
[prop: string]: any;
|
|
}
|
|
export interface OptionGroupData {
|
|
key?: Key;
|
|
label?: React.ReactNode;
|
|
options: OptionData[];
|
|
className?: string;
|
|
style?: React.CSSProperties;
|
|
/** Save for customize data */
|
|
[prop: string]: any;
|
|
}
|
|
export declare type OptionsType = (OptionData | OptionGroupData)[];
|
|
export interface FlattenOptionData {
|
|
group?: boolean;
|
|
groupOption?: boolean;
|
|
key: string | number;
|
|
data: OptionData | OptionGroupData;
|
|
}
|