This commit is contained in:
pat-s 2024-12-16 12:41:46 +01:00
parent f8aad8d1fd
commit 5ad69f01a0
No known key found for this signature in database
GPG key ID: 3C6318841EF78925

View file

@ -1,5 +1,5 @@
<template> <template>
<router-link v-if="to" :to="to" :title="title" :aria-label="title" class="icon-button"> <router-link v-if="to" :to="to" :title="title" :aria-label="title" class="w-4 icon-button">
<slot> <slot>
<Icon v-if="icon" :name="icon" /> <Icon v-if="icon" :name="icon" />
</slot> </slot>
@ -21,7 +21,7 @@
<slot> <slot>
<Icon v-if="icon" :name="icon" /> <Icon v-if="icon" :name="icon" />
</slot> </slot>
<div v-if="isLoading" class="absolute left-0 top-0 right-0 bottom-0 flex items-center justify-center"> <div v-if="isLoading" class="top-0 right-0 bottom-0 left-0 absolute flex justify-center items-center">
<Icon name="loading" class="animate-spin" /> <Icon name="loading" class="animate-spin" />
</div> </div>
</button> </button>
@ -44,6 +44,6 @@ defineProps<{
<style scoped> <style scoped>
.icon-button { .icon-button {
@apply relative flex items-center justify-center px-1 py-1 rounded-md bg-transparent hover-effect overflow-hidden disabled:opacity-50 disabled:cursor-not-allowed; @apply relative flex justify-center items-center bg-transparent disabled:opacity-50 px-1 py-1 rounded-md disabled:cursor-not-allowed overflow-hidden hover-effect;
} }
</style> </style>