View code
View code
<script setup lang="ts">
import { AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogTitle, AlertDialogTrigger, Button } from '@pharen/ui';
</script>
<template>
<AlertDialog>
<AlertDialogTrigger as-child><Button variant="outline">Delete workflow</Button></AlertDialogTrigger>
<AlertDialogContent>
<AlertDialogHeader>
<AlertDialogTitle>Delete this workflow?</AlertDialogTitle>
<AlertDialogDescription>This action cannot be undone. Existing run history will be removed.</AlertDialogDescription>
</AlertDialogHeader>
<AlertDialogFooter>
<AlertDialogCancel>Cancel</AlertDialogCancel>
<AlertDialogAction>Delete workflow</AlertDialogAction>
</AlertDialogFooter>
</AlertDialogContent>
</AlertDialog>
</template>
Installation
npm install @pharen/ui
pnpm add @pharen/ui
yarn add @pharen/ui
bun add @pharen/ui
Import
@pharen/ui/styles.css exactly once in your application entrypoint.Usage
import { AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogMedia, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger } from '@pharen/ui';
Exports
| Export | Purpose |
|---|---|
AlertDialog | Exported Vue component from this module. |
AlertDialogAction | Exported Vue component from this module. |
AlertDialogCancel | Exported Vue component from this module. |
AlertDialogContent | Contains the visible content. |
AlertDialogDescription | Renders supporting description. |
AlertDialogFooter | Structures the footer region. |
AlertDialogHeader | Structures the header region. |
AlertDialogMedia | Exported Vue component from this module. |
AlertDialogOverlay | Exported Vue component from this module. |
AlertDialogPortal | Exported Vue component from this module. |
AlertDialogTitle | Renders the accessible title. |
AlertDialogTrigger | Opens or activates the component. |