File tree 2 files changed +11
-10
lines changed
apps/website/src/routes/docs/tailwind/(components)/dialog
packages/kit-headless/src/components/dialog
2 files changed +11
-10
lines changed Original file line number Diff line number Diff line change @@ -36,7 +36,9 @@ export const Example02 = component$(() => {
36
36
return (
37
37
< PreviewCodeExample >
38
38
< div q :slot = "actualComponent" >
39
- < Button onClick$ = { ( ) => dialogRef . value ?. open ( ) } > Open Dialog</ Button >
39
+ < Button autoFocus onClick$ = { ( ) => dialogRef . value ?. open ( ) } >
40
+ Open Dialog
41
+ </ Button >
40
42
41
43
< Dialog . Root ref = { dialogRef } >
42
44
< Dialog . Header >
@@ -46,9 +48,7 @@ export const Example02 = component$(() => {
46
48
< p id = "dialog-text" > Do you agree to the terms our services?</ p >
47
49
</ Dialog . Content >
48
50
< Dialog . Footer >
49
- < Button onClick$ = { ( ) => dialogRef . value ?. close ( ) } autoFocus >
50
- Disagree
51
- </ Button >
51
+ < button onClick$ = { ( ) => dialogRef . value ?. close ( ) } > Disagree</ button >
52
52
< Button onClick$ = { ( ) => dialogRef . value ?. close ( ) } > Agree</ Button >
53
53
</ Dialog . Footer >
54
54
</ Dialog . Root >
@@ -74,13 +74,10 @@ export const Example_FullScreen = component$(() => {
74
74
< h2 id = "dialog-heading" > Hello 👋</ h2 >
75
75
</ Dialog . Header >
76
76
< Dialog . Content >
77
- < p id = "dialog-text" > Do you agree to the terms our services? </ p >
77
+ < p id = "dialog-text" > I am a simple Dialog. </ p >
78
78
</ Dialog . Content >
79
79
< Dialog . Footer >
80
- < Button onClick$ = { ( ) => dialogRef . value ?. close ( ) } autoFocus >
81
- Disagree
82
- </ Button >
83
- < Button onClick$ = { ( ) => dialogRef . value ?. close ( ) } > Agree</ Button >
80
+ < Button onClick$ = { ( ) => dialogRef . value ?. close ( ) } > Close</ Button >
84
81
</ Dialog . Footer >
85
82
</ Dialog . Root >
86
83
</ div >
Original file line number Diff line number Diff line change 3
3
height : 100vh ;
4
4
}
5
5
6
+ /**
7
+ * Dialog was not stretching over the whole screen.
8
+ * Found an answer on StackOverflow that works:
9
+ * https://stackoverflow.com/a/75024226/1648207
10
+ */
6
11
.full-screen : modal {
7
12
max-width : 100vw ;
8
- height : 100vh ;
9
13
}
You can’t perform that action at this time.
0 commit comments