Files
gatus/web/app/src/components/Loading.vue
T

35 lines
667 B
Vue
Raw Normal View History

2022-01-17 10:37:09 -05:00
<template>
2025-08-14 09:15:34 -04:00
<div class="flex justify-center items-center">
<img
:class="[
'animate-spin rounded-full opacity-60 grayscale',
sizeClass,
]"
src="../assets/logo.svg"
alt="Gatus logo"
/>
2022-01-17 10:37:09 -05:00
</div>
</template>
2025-08-14 09:15:34 -04:00
<script setup>
import { computed } from 'vue'
2022-01-17 10:37:09 -05:00
2025-08-14 09:15:34 -04:00
const props = defineProps({
size: {
type: String,
default: 'md',
validator: (value) => ['xs', 'sm', 'md', 'lg', 'xl'].includes(value)
},
})
const sizeClass = computed(() => {
const sizes = {
xs: 'w-4 h-4',
sm: 'w-6 h-6',
md: 'w-8 h-8',
lg: 'w-12 h-12',
xl: 'w-16 h-16'
}
return sizes[props.size] || sizes.md
})
</script>