File tree Expand file tree Collapse file tree 2 files changed +11
-10
lines changed
apps/website/src/routes/docs/tailwind/(components)/dialog
packages/kit-headless/src/components/dialog Expand file tree Collapse file tree 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$(() => {
3636 return (
3737 < PreviewCodeExample >
3838 < 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 >
4042
4143 < Dialog . Root ref = { dialogRef } >
4244 < Dialog . Header >
@@ -46,9 +48,7 @@ export const Example02 = component$(() => {
4648 < p id = "dialog-text" > Do you agree to the terms our services?</ p >
4749 </ Dialog . Content >
4850 < Dialog . Footer >
49- < Button onClick$ = { ( ) => dialogRef . value ?. close ( ) } autoFocus >
50- Disagree
51- </ Button >
51+ < button onClick$ = { ( ) => dialogRef . value ?. close ( ) } > Disagree</ button >
5252 < Button onClick$ = { ( ) => dialogRef . value ?. close ( ) } > Agree</ Button >
5353 </ Dialog . Footer >
5454 </ Dialog . Root >
@@ -74,13 +74,10 @@ export const Example_FullScreen = component$(() => {
7474 < h2 id = "dialog-heading" > Hello 👋</ h2 >
7575 </ Dialog . Header >
7676 < 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 >
7878 </ Dialog . Content >
7979 < 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 >
8481 </ Dialog . Footer >
8582 </ Dialog . Root >
8683 </ div >
Original file line number Diff line number Diff line change 33 height : 100vh ;
44}
55
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+ */
611.full-screen : modal {
712 max-width : 100vw ;
8- height : 100vh ;
913}
You can’t perform that action at this time.
0 commit comments