Skip to content

Commit 7356dcb

Browse files
committed
example component added
1 parent 43c1328 commit 7356dcb

File tree

2 files changed

+45
-0
lines changed

2 files changed

+45
-0
lines changed

example/src/App.vue

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@
2929
<v-dynamic></v-dynamic>
3030
<h2 class="text-3xl py-2">Advanced dynamic modal</h2>
3131
<v-dynamic-advanced></v-dynamic-advanced>
32+
<h2 class="text-3xl py-2">Tailwind HOC Custom Transition Modal</h2>
33+
<hoc-example-tailwind-custom-transition></hoc-example-tailwind-custom-transition>
3234

3335
<modals-container></modals-container>
3436
<div v-for="i in 100" :key="i">{{ i }}</div>
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
<template>
2+
<div>
3+
<v-tailwind-modal
4+
v-model="show"
5+
@confirm="confirm"
6+
@cancel="cancel"
7+
:transition="{
8+
'enter-active-class': 'transition duration-200 ease-in-out transform',
9+
'enter-class': 'translate-y-full',
10+
'enter-to-class': 'translate-y-0',
11+
'leave-active-class': 'transition duration-200 ease-in-out transform',
12+
'leave-to-class': 'translate-y-full',
13+
'leave-class': 'translate-y-0'
14+
}"
15+
>
16+
<template v-slot:title>Hello, vue-final-modal</template>
17+
<p>
18+
Vue Final Modal is a renderless, stackable, detachable and lightweight
19+
modal component.
20+
</p>
21+
</v-tailwind-modal>
22+
23+
<button class="vfm-btn" @click="show = true">Open modal</button>
24+
</div>
25+
</template>
26+
27+
<script>
28+
export default {
29+
data: () => ({
30+
show: false
31+
}),
32+
methods: {
33+
confirm() {
34+
// some code...
35+
this.show = false
36+
},
37+
cancel(close) {
38+
// some code...
39+
close()
40+
}
41+
}
42+
}
43+
</script>

0 commit comments

Comments
 (0)