mirror of https://github.com/nocodb/nocodb
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
39 lines
789 B
39 lines
789 B
1 year ago
|
<script lang="ts" setup>
|
||
|
import { LoadingOutlined } from '@ant-design/icons-vue'
|
||
|
|
||
|
const props = defineProps<{
|
||
|
size?: 'small' | 'medium' | 'large' | 'xlarge'
|
||
|
loaderClass?: string
|
||
|
}>()
|
||
|
|
||
|
function getFontSize() {
|
||
|
const { size = 'medium' } = props
|
||
|
|
||
|
switch (size) {
|
||
|
case 'small':
|
||
|
return 'text-xs'
|
||
|
case 'medium':
|
||
|
return 'text-sm'
|
||
|
case 'large':
|
||
|
return 'text-xl'
|
||
|
case 'xlarge':
|
||
|
return 'text-3xl'
|
||
|
}
|
||
|
}
|
||
|
|
||
|
const indicator = h(LoadingOutlined, {
|
||
|
class: `!${getFontSize()} flex flex-row items-center ${props.loaderClass || '!text-gray-400'}}`,
|
||
|
spin: true,
|
||
|
})
|
||
|
</script>
|
||
|
|
||
|
<template>
|
||
|
<a-spin class="nc-loader flex flex-row items-center" :indicator="indicator" />
|
||
|
</template>
|
||
|
|
||
|
<style lang="scss" scoped>
|
||
|
:deep(.anticon-spin) {
|
||
|
@apply flex;
|
||
|
}
|
||
|
</style>
|