WlConfirmDialog
A confirmation dialog with accept/reject buttons. Set tone in useWlConfirm().confirm(); confirmDanger remains a danger alias. Install WlConfirmationService and one WlConfirmDialog at the application root.
Basic example
Material was not deleted.
Action and deletion confirmation
Confirm with tone, custom accept/reject labels, cancellation, local result and repeating the example. The legacy confirmDanger alias remains supported.
Choose an action.
Use confirm with tone: danger for a destructive action; the default is accent. confirmDanger remains a compatible alias. The application owns accept/reject handlers.
Connecting the service
Register WlConfirmationService with the Vue application and add one WlConfirmDialog to App.vue. Each application has its own service state. Import styles as described in the installation section.
main.ts · service and container
import { createApp } from "vue";
import { WlConfirmationService } from "legato-ui";
import App from "./App.vue";
const app = createApp(App);
app.use(WlConfirmationService);
app.mount("#app");
// One container in the root App.vue: WlConfirmDialog.
// import { WlConfirmDialog } from "legato-ui";
// <WlConfirmDialog />