Placement
npx npix@latest add Popconfirm
<>
<Popconfirm
content="Are you sure you want to delete this?"
onCancel={()=>{}}
onOk={()=>{}}
placement="top"
title="Confirm Delete"
>
<Button type="danger">
Delete
</Button>
</Popconfirm>
</>
title
React.ReactNode
Title of the popconfirm
content
React.ReactNode
Body content
icon
React.ReactNode
Icon to render next to title. Uses exclamation mark icon by default
placement
"left" | "top" | "right" | "bottom"
Placement of popconfirm. Top by default
onOk
Function
Action to take when the Confirm button is clicked
okButtonProps
Button props
Props for the confirm button
onCancel
Function
Action to take when the Cancel button is clicked
cancelButtonProps
Button props
Props for the Cancel button
okText
string
Text for the Confirm button. Default value is Confirm
cancelText
string
Text for the Cancel button. Default value is Cancel
className
string
classNames to apply to popconfirm
Field | Description | Type |
---|---|---|
title | Title of the popconfirm | React.ReactNode |
content | Body content | React.ReactNode |
icon | Icon to render next to title. Uses exclamation mark icon by default | React.ReactNode |
placement | Placement of popconfirm. Top by default | "left" | "top" | "right" | "bottom" |
onOk | Action to take when the Confirm button is clicked | Function |
okButtonProps | Props for the confirm button | Button props |
onCancel | Action to take when the Cancel button is clicked | Function |
cancelButtonProps | Props for the Cancel button | Button props |
okText | Text for the Confirm button. Default value is Confirm | string |
cancelText | Text for the Cancel button. Default value is Cancel | string |
className | classNames to apply to popconfirm | string |