duoyun-ui
Version:
A lightweight desktop UI component library, implemented using Gem
36 lines (35 loc) • 1.75 kB
TypeScript
import { HTMLAttributes, RefAttributes } from 'react';
import { ForwardRefExoticComponent } from 'react';
import { DuoyunDrawerElement } from '../elements/drawer';
export * from '../elements/drawer';
export type DyDrawerProps = HTMLAttributes<HTMLDivElement> & RefAttributes<DuoyunDrawerElement> & {
open?: DuoyunDrawerElement['open'];
customize?: DuoyunDrawerElement['customize'];
maskClosable?: DuoyunDrawerElement['maskClosable'];
okText?: DuoyunDrawerElement['okText'];
cancelText?: DuoyunDrawerElement['cancelText'];
disableDefaultCancelBtn?: DuoyunDrawerElement['disableDefaultCancelBtn'];
disableDefaultOKBtn?: DuoyunDrawerElement['disableDefaultOKBtn'];
dangerDefaultOkBtn?: DuoyunDrawerElement['dangerDefaultOkBtn'];
header?: DuoyunDrawerElement['header'];
body?: DuoyunDrawerElement['body'];
'onclose'?: (event: CustomEvent<Parameters<DuoyunDrawerElement['close']>[0]>) => void;
'onok'?: (event: CustomEvent<Parameters<DuoyunDrawerElement['ok']>[0]>) => void;
'onmaskclick'?: (event: CustomEvent<Parameters<DuoyunDrawerElement['maskclick']>[0]>) => void;
openAnimation?: DuoyunDrawerElement['openAnimation'];
closeAnimation?: DuoyunDrawerElement['closeAnimation'];
closing?: DuoyunDrawerElement['closing'];
headerSlot?: DuoyunDrawerElement['headerSlot'];
bodySlot?: DuoyunDrawerElement['bodySlot'];
footerSlot?: DuoyunDrawerElement['footerSlot'];
};
export type DyDrawerExpose = {};
declare global {
namespace JSX {
interface IntrinsicElements {
'dy-drawer': DyDrawerProps;
}
}
}
export declare const DyDrawer: ForwardRefExoticComponent<Omit<DyDrawerProps, "ref"> & RefAttributes<DyDrawerExpose>>;
export default DyDrawer;