import type { CLASSES } from './vars'; import type { ButtonProps } from '../button'; import type { BaseProps } from '../types'; import type { RefExtra } from '@laser-ui/hooks/useRefExtra'; export {}; export interface DrawerProps extends BaseProps<'drawer', typeof CLASSES>, React.HTMLAttributes { visible: boolean; header?: React.ReactElement | string; footer?: React.ReactElement; placement?: 'top' | 'right' | 'bottom' | 'left'; width?: number | string; height?: number | string; mask?: boolean; maskClosable?: boolean; escClosable?: boolean; container?: RefExtra; skipFirstTransition?: boolean; destroyAfterClose?: boolean; lazyLoading?: boolean; zIndex?: number | string; onClose?: () => void; afterVisibleChange?: (visible: boolean) => void; } export interface DrawerHeaderProps extends BaseProps<'drawer', typeof CLASSES>, React.HTMLAttributes { actions?: (React.ReactNode | { id: React.Key; action: React.ReactNode; })[]; closeProps?: ButtonProps; onCloseClick?: () => any | Promise; } export interface DrawerFooterProps extends BaseProps<'drawer', typeof CLASSES>, Omit, 'children'> { align?: 'left' | 'center' | 'right'; actions?: (React.ReactNode | { id: React.Key; action: React.ReactNode; })[]; cancelProps?: ButtonProps; okProps?: ButtonProps; onCancelClick?: () => any | Promise; onOkClick?: () => any | Promise; } export interface Offsets { top: number[]; right: number[]; bottom: number[]; left: number[]; }