This commit is contained in:
Hayden 2022-09-02 09:46:20 -08:00
parent 8ece3bd7bf
commit 11dcff450c
15 changed files with 536 additions and 22 deletions

View file

@ -2,10 +2,14 @@
<button
:disabled="disabled || loading"
class="btn"
ref="submitBtn"
:class="{
loading: loading,
}"
>
<label v-if="$slots.icon" class="swap swap-rotate mr-2" :class="{ 'swap-active': isHover }">
<slot name="icon" />
</label>
<slot />
</button>
</template>
@ -21,4 +25,7 @@
default: false,
},
});
const submitBtn = ref(null);
const isHover = useElementHover(submitBtn);
</script>