feat: introduce animations
This commit is contained in:
25
components/translate/SlideLeft.vue
Normal file
25
components/translate/SlideLeft.vue
Normal file
@@ -0,0 +1,25 @@
|
||||
<template>
|
||||
<transition
|
||||
:appear="appear"
|
||||
name="translate-slide-left"
|
||||
enter-active-class="transition duration-500 transform"
|
||||
enter-class="translate-x-full"
|
||||
enter-to-class="translate-x-0"
|
||||
leave-active-class="transition duration-500 transform"
|
||||
leave-class="translate-x-0"
|
||||
leave-to-class="translate-x-full"
|
||||
>
|
||||
<slot></slot>
|
||||
</transition>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
props: {
|
||||
appear: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
25
components/translate/SlideRight.vue
Normal file
25
components/translate/SlideRight.vue
Normal file
@@ -0,0 +1,25 @@
|
||||
<template>
|
||||
<transition
|
||||
:appear="appear"
|
||||
name="translate-slide-right"
|
||||
enter-active-class="transition duration-500 transform"
|
||||
enter-class="-translate-x-full"
|
||||
enter-to-class="translate-x-0"
|
||||
leave-active-class="transition duration-500 transform"
|
||||
leave-class="translate-x-0"
|
||||
leave-to-class="-translate-x-full"
|
||||
>
|
||||
<slot></slot>
|
||||
</transition>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
props: {
|
||||
appear: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
Reference in New Issue
Block a user