UNPKG

1.29 kBTypeScriptView Raw
1import * as React from 'react';
2import type { ButtonProps, LegacyButtonType } from '../button/button';
3import type { AbstractTooltipProps } from '../tooltip';
4import type { RenderFunction } from '../_util/getRenderPropValue';
5export interface PopconfirmProps extends AbstractTooltipProps {
6 title: React.ReactNode | RenderFunction;
7 disabled?: boolean;
8 onConfirm?: (e?: React.MouseEvent<HTMLElement>) => void;
9 onCancel?: (e?: React.MouseEvent<HTMLElement>) => void;
10 okText?: React.ReactNode;
11 okType?: LegacyButtonType;
12 cancelText?: React.ReactNode;
13 okButtonProps?: ButtonProps;
14 cancelButtonProps?: ButtonProps;
15 showCancel?: boolean;
16 icon?: React.ReactNode;
17 /**
18 * @deprecated `onVisibleChange` is deprecated which will be removed in next major version. Please
19 * use `onOpenChange` instead.
20 */
21 onVisibleChange?: (visible: boolean, e?: React.MouseEvent<HTMLElement> | React.KeyboardEvent<HTMLDivElement>) => void;
22 onOpenChange?: (open: boolean, e?: React.MouseEvent<HTMLElement> | React.KeyboardEvent<HTMLDivElement>) => void;
23}
24export interface PopconfirmState {
25 open?: boolean;
26}
27declare const Popconfirm: React.ForwardRefExoticComponent<PopconfirmProps & React.RefAttributes<unknown>>;
28export default Popconfirm;