mirror of
https://github.com/Litlyx/litlyx
synced 2025-12-10 07:48:37 +01:00
14 lines
505 B
Vue
14 lines
505 B
Vue
<script lang="ts" setup>
|
|
|
|
const props = defineProps<{ label: string, disabled?: boolean, loading?: boolean }>();
|
|
|
|
</script>
|
|
|
|
|
|
<template>
|
|
<div :class="{ '!bg-[#354a87] !text-text/50 !cursor-not-allowed': (disabled || loading) }"
|
|
class="bg-accent text-text px-4 py-2 text-center cursor-pointer hover:bg-[#5075e2] hover:text-text-sub">
|
|
<span v-show="!loading">{{ label }}</span>
|
|
<i v-if="loading" class="fas fa-loader animate-[spin_2s_linear_infinite]"></i>
|
|
</div>
|
|
</template> |