pilotwings/frontend/components/Loading.vue

32 lines
529 B
Vue
Raw Permalink Normal View History

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