|
|
@ -2,14 +2,14 @@ import ExclamationCircleFilled from '@ant-design/icons/ExclamationCircleFilled'; |
|
|
|
import classNames from 'classnames'; |
|
|
|
import * as React from 'react'; |
|
|
|
import type { PopconfirmProps } from '.'; |
|
|
|
import ActionButton from '../_util/ActionButton'; |
|
|
|
import { getRenderPropValue } from '../_util/getRenderPropValue'; |
|
|
|
import Button from '../button'; |
|
|
|
import { convertLegacyProps } from '../button/button'; |
|
|
|
import { ConfigContext } from '../config-provider'; |
|
|
|
import defaultLocale from '../locale/en_US'; |
|
|
|
import { useLocale } from '../locale'; |
|
|
|
import defaultLocale from '../locale/en_US'; |
|
|
|
import PopoverPurePanel from '../popover/PurePanel'; |
|
|
|
import ActionButton from '../_util/ActionButton'; |
|
|
|
import { getRenderPropValue } from '../_util/getRenderPropValue'; |
|
|
|
|
|
|
|
import useStyle from './style'; |
|
|
|
|
|
|
@ -30,6 +30,7 @@ export interface OverlayProps |
|
|
|
| 'showCancel' |
|
|
|
| 'title' |
|
|
|
| 'description' |
|
|
|
| 'onPopupClick' |
|
|
|
> { |
|
|
|
prefixCls: string; |
|
|
|
close?: Function; |
|
|
@ -52,6 +53,7 @@ export const Overlay: React.FC<OverlayProps> = (props) => { |
|
|
|
close, |
|
|
|
onConfirm, |
|
|
|
onCancel, |
|
|
|
onPopupClick, |
|
|
|
} = props; |
|
|
|
|
|
|
|
const { getPrefixCls } = React.useContext(ConfigContext); |
|
|
@ -59,7 +61,7 @@ export const Overlay: React.FC<OverlayProps> = (props) => { |
|
|
|
const [contextLocale] = useLocale('Popconfirm', defaultLocale.Popconfirm); |
|
|
|
|
|
|
|
return ( |
|
|
|
<div className={`${prefixCls}-inner-content`}> |
|
|
|
<div className={`${prefixCls}-inner-content`} onClick={onPopupClick}> |
|
|
|
<div className={`${prefixCls}-message`}> |
|
|
|
{icon && <span className={`${prefixCls}-message-icon`}>{icon}</span>} |
|
|
|
<div |
|
|
|