UNPKG

1.23 kBTypeScriptView Raw
1import * as React from 'react';
2import type { RenderFunction } from '../_util/getRenderPropValue';
3import type { ButtonProps, LegacyButtonType } from '../button/button';
4import type { AbstractTooltipProps } from '../tooltip';
5import PurePanel from './PurePanel';
6export interface PopconfirmProps extends AbstractTooltipProps {
7 title: React.ReactNode | RenderFunction;
8 description?: React.ReactNode | RenderFunction;
9 disabled?: boolean;
10 onConfirm?: (e?: React.MouseEvent<HTMLElement>) => void;
11 onCancel?: (e?: React.MouseEvent<HTMLElement>) => void;
12 okText?: React.ReactNode;
13 okType?: LegacyButtonType;
14 cancelText?: React.ReactNode;
15 okButtonProps?: ButtonProps;
16 cancelButtonProps?: ButtonProps;
17 showCancel?: boolean;
18 icon?: React.ReactNode;
19 onOpenChange?: (open: boolean, e?: React.MouseEvent<HTMLElement> | React.KeyboardEvent<HTMLDivElement>) => void;
20 onPopupClick?: (e: React.MouseEvent<HTMLElement>) => void;
21}
22export interface PopconfirmState {
23 open?: boolean;
24}
25declare const Popconfirm: React.ForwardRefExoticComponent<PopconfirmProps & React.RefAttributes<unknown>> & {
26 _InternalPanelDoNotUseOrYouWillBeFired: typeof PurePanel;
27};
28export default Popconfirm;