pilotwings/frontend/components/Loading.vue

32 lines
540 B
Vue

<template>
<div :class="loading ? 'skeleton-block' : ''">
<Message v-if="message" :type="type">{{ message }}</Message>
<slot v-if="!loading && !message" />
</div>
</template>
<script lang="ts">
import Message from '@/components/Message.vue'
export default {
name: 'Loading',
components: {
Message,
},
props: {
loading: {
type: Boolean,
default: true,
},
message: {
type: String,
default: '',
},
type: {
type: String,
default: 'info',
},
},
}
</script>