easy-antd-modal
Version:
二次开发, 简化 Ant Design Modal 的使用方式
15 lines (14 loc) • 769 B
TypeScript
import type { DrawerProps as AntdDrawerProps } from 'antd';
import type { PropsWithModalEnhanced, UseModalEnhancedProps } from '../hooks';
import type { AnyObj } from '../types';
/** @internal */
type CloseCallback = Pick<AntdDrawerProps, 'onClose'>;
export type DrawerProps = Omit<AntdDrawerProps, 'visible' | 'children'> & UseModalEnhancedProps;
/**
* @description 方便用户自定义 `Modal` 的 `props`
* @since 1.6.0
*/
export type DrawerContentPropsWithEnhanced<P extends AnyObj = AnyObj> = PropsWithModalEnhanced<P, CloseCallback>;
/** @see [easy-antd-modal#Drawer](https://github.com/Wxh16144/easy-antd-modal/blob/master/src/drawer/index.tsx) */
declare const Drawer: (props: DrawerProps) => import("react/jsx-runtime").JSX.Element;
export default Drawer;