Initial commit from monorepo
This commit is contained in:
23
app/components/ui/Spinner.vue
Normal file
23
app/components/ui/Spinner.vue
Normal file
@@ -0,0 +1,23 @@
|
||||
<template>
|
||||
<span :class="spinnerClass" />
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
const props = defineProps({
|
||||
size: {
|
||||
type: String,
|
||||
default: 'md', // sm | md | lg
|
||||
},
|
||||
})
|
||||
|
||||
const sizeMap: Record<string, string> = {
|
||||
sm: 'loading-sm',
|
||||
md: 'loading-md',
|
||||
lg: 'loading-lg',
|
||||
}
|
||||
|
||||
const spinnerClass = computed(() => {
|
||||
const sizeClass = sizeMap[props.size] || sizeMap.md
|
||||
return ['loading loading-spinner', sizeClass].join(' ')
|
||||
})
|
||||
</script>
|
||||
Reference in New Issue
Block a user