2016-08-26 14:42:41 +08:00
|
|
|
---
|
|
|
|
category: Components
|
2016-11-09 14:43:32 +08:00
|
|
|
type: Feedback
|
2016-08-26 15:07:46 +08:00
|
|
|
title: Popconfirm
|
2016-08-26 14:42:41 +08:00
|
|
|
---
|
|
|
|
|
|
|
|
A simple and compact confirmation dialog of an action.
|
|
|
|
|
2016-09-10 13:43:30 +08:00
|
|
|
## When To Use
|
2016-08-26 14:42:41 +08:00
|
|
|
|
|
|
|
A simple and compact dialog used for asking an user confirmation.
|
|
|
|
|
|
|
|
The difference with `confirm` is more lightweight than the static popped full-screen confirm modal.
|
|
|
|
|
|
|
|
## API
|
|
|
|
|
|
|
|
| Param | Description | Type | Default value |
|
|
|
|
|-----------|------------------------------------------|---------------|--------|
|
2017-01-20 20:10:50 +08:00
|
|
|
| title | title of the confirmation box | string\|ReactNode | none |
|
2017-02-24 16:07:39 +08:00
|
|
|
| onConfirm | callback of confirmation | function(e) | none |
|
|
|
|
| onCancel | callback of cancel | function(e) | none |
|
2017-01-20 20:10:50 +08:00
|
|
|
| okText | text of the confirmation button | string | Confirm |
|
|
|
|
| cancelText| text of the cancel button | string | Cancel |
|
2016-12-22 12:00:57 +08:00
|
|
|
|
|
|
|
Consult [Tooltip's documentation](https://ant.design/components/tooltip/#API) to find more APIs.
|
2017-01-22 14:26:46 +08:00
|
|
|
|
|
|
|
## Note
|
|
|
|
|
2017-01-22 15:05:32 +08:00
|
|
|
Please ensure that the child node of `Popconfirm` accepts `onMouseEnter`, `onMouseLeave`, `onFocus`, `onClick` event.
|