Popconfirm

Inline confirm popover on an action.

import { Popconfirm, Button } from "@/rl-ui";

<Popconfirm title="Remove?" onConfirm={onRemove}>
<Button variant="ghost">Remove</Button>
</Popconfirm>

Examples

Non-destructive

import { Popconfirm, Button } from "@/rl-ui";

<Popconfirm title="Archive?" description="You can restore later." danger={false} okText="Archive">
<Button variant="secondary">Archive</Button>
</Popconfirm>

API

PropTypeDefaultDescription
titleReactNode—Confirm title (required).
descriptionReactNode—Supporting copy.
okTextstring"Delete"Confirm button label.
cancelTextstring"Cancel"Cancel button label.
dangerbooleantrueUse danger styling on confirm.
side"top" | "right" | "bottom" | "left""top"Preferred placement.
onConfirm() => void—Confirm handler.
onCancel() => void—Cancel handler.
disabledbooleanfalseDisable the confirm.