UNPKG

1.28 kBTypeScriptView Raw
1import * as React from 'react';
2import type { DrawerProps as RcDrawerProps } from 'rc-drawer';
3import type { Placement } from 'rc-drawer/lib/Drawer';
4import type { DrawerClassNames, DrawerPanelProps, DrawerStyles } from './DrawerPanel';
5declare const SizeTypes: readonly ["default", "large"];
6type sizeType = (typeof SizeTypes)[number];
7export interface PushState {
8 distance: string | number;
9}
10export interface DrawerProps extends Omit<RcDrawerProps, 'maskStyle'>, Omit<DrawerPanelProps, 'prefixCls'> {
11 size?: sizeType;
12 open?: boolean;
13 afterOpenChange?: (open: boolean) => void;
14 /** @deprecated Please use `open` instead */
15 visible?: boolean;
16 /** @deprecated Please use `afterOpenChange` instead */
17 afterVisibleChange?: (open: boolean) => void;
18 classNames?: DrawerClassNames;
19 styles?: DrawerStyles;
20}
21declare const Drawer: React.FC<DrawerProps> & {
22 _InternalPanelDoNotUseOrYouWillBeFired: typeof PurePanel;
23};
24interface PurePanelInterface {
25 prefixCls?: string;
26 style?: React.CSSProperties;
27 className?: string;
28 placement?: Placement;
29}
30/** @private Internal Component. Do not use in your production. */
31declare const PurePanel: React.FC<Omit<DrawerPanelProps, 'prefixCls'> & PurePanelInterface>;
32export default Drawer;