53 lines
1.9 KiB
TypeScript
53 lines
1.9 KiB
TypeScript
import type { CSSMotionProps } from '@rc-component/motion';
|
|
import * as React from 'react';
|
|
import type { DrawerPanelAccessibility, DrawerPanelEvents } from './DrawerPanel';
|
|
import type { DrawerClassNames, DrawerStyles } from './inter';
|
|
export type Placement = 'left' | 'right' | 'top' | 'bottom';
|
|
export interface PushConfig {
|
|
distance?: number | string;
|
|
}
|
|
export interface DrawerPopupProps extends DrawerPanelEvents, DrawerPanelAccessibility {
|
|
prefixCls: string;
|
|
open?: boolean;
|
|
inline?: boolean;
|
|
push?: boolean | PushConfig;
|
|
forceRender?: boolean;
|
|
keyboard?: boolean;
|
|
autoFocus?: boolean;
|
|
focusTrap?: boolean;
|
|
rootClassName?: string;
|
|
rootStyle?: React.CSSProperties;
|
|
zIndex?: number;
|
|
placement?: Placement;
|
|
id?: string;
|
|
className?: string;
|
|
style?: React.CSSProperties;
|
|
children?: React.ReactNode;
|
|
width?: number | string;
|
|
height?: number | string;
|
|
/** Size of the drawer (width for left/right placement, height for top/bottom placement) */
|
|
size?: number | string;
|
|
/** Maximum size of the drawer */
|
|
maxSize?: number;
|
|
mask?: boolean;
|
|
maskClosable?: boolean;
|
|
maskClassName?: string;
|
|
maskStyle?: React.CSSProperties;
|
|
motion?: CSSMotionProps | ((placement: Placement) => CSSMotionProps);
|
|
maskMotion?: CSSMotionProps;
|
|
afterOpenChange?: (open: boolean) => void;
|
|
onClose?: (event: React.MouseEvent<HTMLElement> | React.KeyboardEvent<HTMLElement>) => void;
|
|
classNames?: DrawerClassNames;
|
|
styles?: DrawerStyles;
|
|
drawerRender?: (node: React.ReactNode) => React.ReactNode;
|
|
/** Default size for uncontrolled resizable drawer */
|
|
defaultSize?: number | string;
|
|
resizable?: boolean | {
|
|
onResize?: (size: number) => void;
|
|
onResizeStart?: () => void;
|
|
onResizeEnd?: () => void;
|
|
};
|
|
}
|
|
declare const RefDrawerPopup: React.ForwardRefExoticComponent<DrawerPopupProps & React.RefAttributes<HTMLDivElement>>;
|
|
export default RefDrawerPopup;
|