Created
September 1, 2020 21:57
-
-
Save acidjazz/11e42e9724a1182f6fdc9a2d15a0c58b to your computer and use it in GitHub Desktop.
icon transition
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<template> | |
<transition | |
mode="out-in" | |
enter-active-class="ease-out duration-300" | |
enter-class="-translate-y-2 opacity-0" | |
enter-to-class="translate-y-0 opacity-100" | |
leave-active-class="ease-in duration-300" | |
leave-class="opacity-100 translate-y-0" | |
leave-to-class="opacity-0 translate-y-2" | |
> | |
<div v-if="loading" key="loading" class="w-5 h-5 transform"> | |
<IconSpinner class="w-5 h-5" primary="text-gray-400" secondary="text-gray-800" /> | |
</div> | |
<IconSearch v-else key="search" class="h-5 w-5 transform" primary="text-gray-400" secondary="text-gray-500" /> | |
</transition> | |
</template> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment