logonpix

Popconfirm

Example
Props

Placement

Installation
npx npix@latest add Popconfirm
Usage
<>
  <Popconfirm
    content="Are you sure you want to delete this?"
    onCancel={()=>{}}
    onOk={()=>{}}
    placement="top"
    title="Confirm Delete"
  >
    <Button type="danger">
      Delete
    </Button>
  </Popconfirm>
</>
API

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


FieldDescriptionType
titleTitle of the popconfirmReact.ReactNode
contentBody contentReact.ReactNode
iconIcon to render next to title. Uses exclamation mark icon by defaultReact.ReactNode
placementPlacement of popconfirm. Top by default"left" | "top" | "right" | "bottom"
onOkAction to take when the Confirm button is clickedFunction
okButtonPropsProps for the confirm buttonButton props
onCancelAction to take when the Cancel button is clickedFunction
cancelButtonPropsProps for the Cancel buttonButton props
okTextText for the Confirm button. Default value is Confirmstring
cancelTextText for the Cancel button. Default value is Cancelstring
classNameclassNames to apply to popconfirmstring