Components
Popconfirm
A question at the point of no return: the trigger opens a small anchored vessel carrying the message and two answers. Confirmation and cancellation are the caller's to act on — the panel closes either way. The default slot is the trigger; give it a single element (wrap a group in a span otherwise).
#Basic usage
<script setup lang="ts">
import { Button, Popconfirm } from "@bysages/vue";
</script>
<template>
<div class="flex gap-4">
<Popconfirm message="Discard this draft?">
<Button variant="outline">Discard</Button>
</Popconfirm>
<Popconfirm message="Archive the ledger?" confirm-text="Archive" cancel-text="Keep">
<Button>Archive</Button>
</Popconfirm>
</div>
</template>
#Props
#Popconfirm
A question at the point of no return: the trigger opens a small anchored vessel carrying the message and two answers. Confirmation and cancellation are the caller's to act on — the panel closes either way. The default slot is the trigger; give it a single element (wrap a group in a span otherwise).
| Prop | Type | Default | Description |
|---|---|---|---|
message | String | The question the reader is answering. | |
confirmText | String | "Confirm" | — |
cancelText | String | "Cancel" | — |