11<script setup lang="ts">
2- import { VDialog } from " #components " ;
2+ import { VDialog } from " @blro/ui-primitives-vue " ;
33
44const basic = ref <InstanceType <typeof VDialog >>();
55const transition = ref <InstanceType <typeof VDialog >>();
@@ -9,6 +9,8 @@ const cancelEscape = ref<InstanceType<typeof VDialog>>();
99const cancelHistory = ref <InstanceType <typeof VDialog >>();
1010const preventCancel = ref <InstanceType <typeof VDialog >>();
1111const halfPreventCancel = ref <InstanceType <typeof VDialog >>();
12+ const nested = ref <InstanceType <typeof VDialog >>();
13+ const nested2 = ref <InstanceType <typeof VDialog >>();
1214
1315function preventCancelHalf(event : Event ) {
1416 if (Math .random () < 0.5 ) event .preventDefault ();
@@ -35,10 +37,12 @@ function preventCancelHalf(event: Event) {
3537 <button @click =" transition?.show()" >Show</button >
3638 <button @click =" transition?.showModal()" >Show Modal</button >
3739 </div >
38- <VDialog :transition =" { name: 'dialog__transition' }" ref =" transition" >
39- Hello, Transition Dialog!
40- <button @click =" transition?.close()" >Close</button >
41- </VDialog >
40+ <VTransition name =" dialog__transition" >
41+ <VDialog ref =" transition" >
42+ Hello, Transition Dialog!
43+ <button @click =" transition?.close()" >Close</button >
44+ </VDialog >
45+ </VTransition >
4246 </article >
4347 <article >
4448 <h2 >Title & Description</h2 >
@@ -88,6 +92,17 @@ function preventCancelHalf(event: Event) {
8892 <button @click =" halfPreventCancel?.cancel()" >Cancel</button >
8993 </VDialog >
9094 </article >
95+ <article >
96+ <h2 >Nested Dialog</h2 >
97+ <div class =" dialog__button-group" >
98+ <button @click =" nested?.showModal()" >Show</button >
99+ </div >
100+ <VDialog ref =" nested" >
101+ This is a dialog.
102+ <button @click =" nested2?.showModal()" >Show Nested</button >
103+ <VDialog ref =" nested2" >This is a nested dialog.</VDialog >
104+ </VDialog >
105+ </article >
91106 </div >
92107</template >
93108
0 commit comments