File tree Expand file tree Collapse file tree 2 files changed +47
-27
lines changed Expand file tree Collapse file tree 2 files changed +47
-27
lines changed Original file line number Diff line number Diff line change 1- # Dialog
1+ ---
2+ title : Dialog
3+ description : Modal dialog window displayed above the page.
4+ ---
25
3- <DialogRoot >
4- <DialogTrigger as-child >
5- <Button>Open Dailog</Button>
6- </DialogTrigger >
7- <DialogContent close-icon >
8- <DialogTitle>This is title</DialogTitle>
9- <div>Hello, this is a dialog</div>
10- </DialogContent >
11- </DialogRoot >
12-
13- -----
14-
15- <AlertDialogRoot >
16- <AlertDialogTrigger as-child >
17- <Button>Open Dailog</Button>
18- </AlertDialogTrigger >
19- <AlertDialogContent close-icon >
20- <AlertDialogDescription>This is title</AlertDialogDescription>
21- <div>Hello, this is a dialog</div>
22- <div class="flex items-center gap-4">
23- <AlertDialogCancel as-child>
24- <Button color="gray" variant="soft">Cancel</Button>
25- </AlertDialogCancel>
26- </div>
27- </AlertDialogContent >
28- </AlertDialogRoot >
6+ <Example name =" dialog/Overview.vue " />
Original file line number Diff line number Diff line change 1+ <script setup lang="ts">
2+ import {
3+ Button ,
4+ DialogRoot ,
5+ DialogTrigger ,
6+ DialogContent ,
7+ DialogTitle ,
8+ DialogDescription ,
9+ DialogClose ,
10+ TextField ,
11+ } from ' #components'
12+ </script >
13+
14+ <template >
15+ <DialogRoot >
16+ <Button :as =" DialogTrigger" >Edit profile</Button >
17+ <DialogContent maxWidth =" 450px" >
18+ <DialogTitle >Edit profile</DialogTitle >
19+ <DialogDescription >Make changes to your profile.</DialogDescription >
20+ <div class =" flex flex-col gap-3 mt-4" >
21+ <label >
22+ <span class =" block text-sm font-semibold mb-1" >Name</span >
23+ <TextField model-value =" Freja Johnsen" placeholder =" Enter your full name" />
24+ </label >
25+ <label >
26+ <span class =" block text-sm font-semibold mb-1" >Email</span >
27+ <
TextField model-value =
" [email protected] " placeholder =
" Enter your email" />
28+ </label >
29+ </div >
30+ <div class =" flex mt-4 justify-end gap-3" >
31+ <DialogClose as-child >
32+ <Button variant =" soft" color =" gray" >
33+ Cancel
34+ </Button >
35+ </DialogClose >
36+ <DialogClose as-child >
37+ <Button >Save</Button >
38+ </DialogClose >
39+ </div >
40+ </DialogContent >
41+ </DialogRoot >
42+ </template >
You can’t perform that action at this time.
0 commit comments