dialog
Basic dialog
Basic dialog
Загрузка превью…
src/dialog/c-dialog-1.vue
<script setup lang="ts">
import { Button } from "@/components/ui/button"
import { Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, DialogTrigger } from "@/components/ui/dialog"
import { Field, FieldGroup, FieldLabel } from "@/components/ui/field"
import { Input } from "@/components/ui/input"
</script>
<template>
<div class="flex items-center justify-center">
<Dialog>
<form>
<DialogTrigger as-child>
<Button variant="outline">Basic Dialog</Button>
</DialogTrigger>
<DialogContent>
<DialogHeader>
<DialogTitle>Edit profile</DialogTitle>
<DialogDescription>
Make changes to your profile here. Click save when you're done. Your profile will be updated
immediately.
</DialogDescription>
</DialogHeader>
<FieldGroup>
<Field>
<FieldLabel for="name-1">Name</FieldLabel>
<Input id="name-1" name="name" value="Pedro Duarte" />
</Field>
<Field>
<FieldLabel for="username-1">Username</FieldLabel>
<Input id="username-1" name="username" value="@peduarte" />
</Field>
</FieldGroup>
<DialogFooter>
<DialogClose as-child>
<Button variant="outline">Cancel</Button>
</DialogClose>
<Button type="submit">Save changes</Button>
</DialogFooter>
</DialogContent>
</form>
</Dialog>
</div>
</template>