easy-antd-modal
Version:
二次开发, 简化 Ant Design Modal 的使用方式
20 lines (19 loc) • 1.1 kB
TypeScript
/// <reference types="react" />
import type { ModalProps as AntdModalProps } from 'antd';
import type { PropsWithModalEnhanced, UseModalEnhancedProps } from '../hooks';
import type { AnyObj } from '../types';
/** @internal */
type CloseCallback = Pick<ModalProps, 'onCancel'>;
export type ModalProps = Omit<AntdModalProps, 'visible' | 'children'> & UseModalEnhancedProps;
/**
* @description 方便用户自定义 `Modal` 的 `props`
* @since 1.6.0
*/
export type ModalContentPropsWithEnhanced<P extends AnyObj = AnyObj> = PropsWithModalEnhanced<P, CloseCallback>;
declare const _default: ((props: ModalProps) => import("react/jsx-runtime").JSX.Element) & Omit<import("react").FC<AntdModalProps> & import("antd/es/modal/confirm").ModalStaticFunctions & {
useModal: typeof import("antd/es/modal/useModal").default;
destroyAll: () => void;
config: typeof import("antd/es/modal/confirm").modalGlobalConfig;
_InternalPanelDoNotUseOrYouWillBeFired: (props: import("antd/es/modal/PurePanel").PurePanelProps) => import("react").JSX.Element;
}, keyof AntdModalProps>;
export default _default;