DrawerPopup.d.ts 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. import type { CSSMotionProps } from 'rc-motion';
  2. import * as React from 'react';
  3. import type { DrawerPanelAccessibility, DrawerPanelEvents } from './DrawerPanel';
  4. import type { DrawerClassNames, DrawerStyles } from './inter';
  5. export type Placement = 'left' | 'right' | 'top' | 'bottom';
  6. export interface PushConfig {
  7. distance?: number | string;
  8. }
  9. export interface DrawerPopupProps extends DrawerPanelEvents, DrawerPanelAccessibility {
  10. prefixCls: string;
  11. open?: boolean;
  12. inline?: boolean;
  13. push?: boolean | PushConfig;
  14. forceRender?: boolean;
  15. autoFocus?: boolean;
  16. keyboard?: boolean;
  17. rootClassName?: string;
  18. rootStyle?: React.CSSProperties;
  19. zIndex?: number;
  20. placement?: Placement;
  21. id?: string;
  22. className?: string;
  23. style?: React.CSSProperties;
  24. children?: React.ReactNode;
  25. width?: number | string;
  26. height?: number | string;
  27. mask?: boolean;
  28. maskClosable?: boolean;
  29. maskClassName?: string;
  30. maskStyle?: React.CSSProperties;
  31. motion?: CSSMotionProps | ((placement: Placement) => CSSMotionProps);
  32. maskMotion?: CSSMotionProps;
  33. afterOpenChange?: (open: boolean) => void;
  34. onClose?: (event: React.MouseEvent<HTMLElement> | React.KeyboardEvent<HTMLElement>) => void;
  35. classNames?: DrawerClassNames;
  36. styles?: DrawerStyles;
  37. drawerRender?: (node: React.ReactNode) => React.ReactNode;
  38. }
  39. declare const RefDrawerPopup: React.ForwardRefExoticComponent<DrawerPopupProps & React.RefAttributes<HTMLDivElement>>;
  40. export default RefDrawerPopup;