duoyun-ui
Version:
A lightweight desktop UI component library, implemented using Gem
37 lines (36 loc) • 1.64 kB
TypeScript
import { HTMLAttributes, RefAttributes } from 'react';
import { ForwardRefExoticComponent } from 'react';
import { DuoyunSelectElement } from '../elements/select';
export * from '../elements/select';
export type DySelectProps = HTMLAttributes<HTMLDivElement> & RefAttributes<DuoyunSelectElement> & {
multiple?: DuoyunSelectElement['multiple'];
disabled?: DuoyunSelectElement['disabled'];
searchable?: DuoyunSelectElement['searchable'];
keepsearch?: DuoyunSelectElement['keepsearch'];
inline?: DuoyunSelectElement['inline'];
placeholder?: DuoyunSelectElement['placeholder'];
borderless?: DuoyunSelectElement['borderless'];
pinselected?: DuoyunSelectElement['pinselected'];
loading?: DuoyunSelectElement['loading'];
dropdownStyle?: DuoyunSelectElement['dropdownStyle'];
options?: DuoyunSelectElement['options'];
adder?: DuoyunSelectElement['adder'];
value?: DuoyunSelectElement['value'];
renderLabel?: DuoyunSelectElement['renderLabel'];
renderTag?: DuoyunSelectElement['renderTag'];
active?: DuoyunSelectElement['active'];
'onchange'?: (event: CustomEvent<Parameters<DuoyunSelectElement['change']>[0]>) => void;
'onsearch'?: (event: CustomEvent<Parameters<DuoyunSelectElement['search']>[0]>) => void;
};
export type DySelectExpose = {
showPicker: DuoyunSelectElement['showPicker'];
};
declare global {
namespace JSX {
interface IntrinsicElements {
'dy-select': DySelectProps;
}
}
}
export declare const DySelect: ForwardRefExoticComponent<Omit<DySelectProps, "ref"> & RefAttributes<DySelectExpose>>;
export default DySelect;