duoyun-ui
Version:
A lightweight desktop UI component library, implemented using Gem
29 lines (28 loc) • 1.18 kB
TypeScript
import { HTMLAttributes, RefAttributes } from 'react';
import { ForwardRefExoticComponent } from 'react';
import { DuoyunPickerElement } from '../elements/picker';
export * from '../elements/picker';
export type DyPickerProps = HTMLAttributes<HTMLDivElement> & RefAttributes<DuoyunPickerElement> & {
placeholder?: DuoyunPickerElement['placeholder'];
disabled?: DuoyunPickerElement['disabled'];
borderless?: DuoyunPickerElement['borderless'];
selectmode?: DuoyunPickerElement['selectmode'];
fit?: DuoyunPickerElement['fit'];
multiple?: DuoyunPickerElement['multiple'];
active?: DuoyunPickerElement['active'];
options?: DuoyunPickerElement['options'];
value?: DuoyunPickerElement['value'];
'onchange'?: (event: CustomEvent<Parameters<DuoyunPickerElement['change']>[0]>) => void;
};
export type DyPickerExpose = {
showPicker: DuoyunPickerElement['showPicker'];
};
declare global {
namespace JSX {
interface IntrinsicElements {
'dy-picker': DyPickerProps;
}
}
}
export declare const DyPicker: ForwardRefExoticComponent<Omit<DyPickerProps, "ref"> & RefAttributes<DyPickerExpose>>;
export default DyPicker;