style: add transitions

This commit is contained in:
Amit Joki
2025-01-13 15:13:40 +05:30
parent 878f6db523
commit b847ffb6ed
3 changed files with 16 additions and 8 deletions

View File

@@ -82,8 +82,12 @@ onMounted(generate)
</template>
<NcButton size="small" type="secondary" @click="performCopy(copyAsPng)">
<template #icon>
<GeneralIcon v-if="isCopied" icon="check" class="h-4 w-4" />
<GeneralIcon v-else icon="copy" class="h-4 w-4" />
<div class="flex children:flex-none relative h-4 w-4">
<Transition name="icon-fade" :duration="200">
<GeneralIcon v-if="isCopied" icon="check" class="h-4 w-4 opacity-80" />
<GeneralIcon v-else icon="copy" class="h-4 w-4 opacity-80" />
</Transition>
</div>
</template>
{{ isCopied ? $t('general.copied') : $t('general.copy') }}
</NcButton>