feat: Add dedicated default loading component

* add option to pass a transition name

Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com>
This commit is contained in:
Braks
2021-11-20 18:22:30 +01:00
parent 4e8ff6201a
commit 668fed1dc4
6 changed files with 137 additions and 65 deletions
@@ -0,0 +1,18 @@
<script lang="ts" setup>
import { CSSProperties } from 'vue'
interface LoadingIndicatorProps {
label?: string
class?: string
style?: CSSProperties
}
const props = withDefaults(defineProps<LoadingIndicatorProps>(), {
label: 'Almost ready...',
})
</script>
<template>
<div class="vue-flow__loading-indicator" :class="props.class" :style="props.style">
<slot name="label"> {{ props.label }} </slot>
</div>
</template>