mirror of
https://github.com/YunoHost/yunohost-admin.git
synced 2024-09-03 20:06:15 +02:00
migration(bvn): add BSkeleton & BSkeletonWrapper component missing in bootstrap-vue-next
This commit is contained in:
parent
5892842cec
commit
c7bd9af3a2
2 changed files with 56 additions and 0 deletions
34
app/src/components/globals/skeletons/BSkeleton.vue
Normal file
34
app/src/components/globals/skeletons/BSkeleton.vue
Normal file
|
@ -0,0 +1,34 @@
|
||||||
|
<template>
|
||||||
|
<div :style="{ height, width }" class="b-skeleton" />
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
name: 'BSkeleton',
|
||||||
|
|
||||||
|
props: {
|
||||||
|
height: { type: String, required: true },
|
||||||
|
width: { type: String, required: true },
|
||||||
|
},
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped lang="scss">
|
||||||
|
.b-skeleton {
|
||||||
|
position: relative;
|
||||||
|
overflow: hidden;
|
||||||
|
background-color: $gray-200;
|
||||||
|
cursor: wait;
|
||||||
|
|
||||||
|
height: $font-size-base;
|
||||||
|
margin-bottom: map-get($spacers, 1);
|
||||||
|
|
||||||
|
@if $enable-rounded {
|
||||||
|
border-radius: 0.25rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
[data-bs-theme='dark'] & {
|
||||||
|
background-color: $gray-800;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
22
app/src/components/globals/skeletons/BSkeletonWrapper.vue
Normal file
22
app/src/components/globals/skeletons/BSkeletonWrapper.vue
Normal file
|
@ -0,0 +1,22 @@
|
||||||
|
<template>
|
||||||
|
<div v-if="loading" class="b-skeleton-wrapper">
|
||||||
|
<slot name="loading" />
|
||||||
|
</div>
|
||||||
|
<slot v-else name="default" />
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
name: 'BSkeletonWrapper',
|
||||||
|
|
||||||
|
props: {
|
||||||
|
loading: { type: Boolean, default: false },
|
||||||
|
},
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped lang="scss">
|
||||||
|
.b-skeleton-wrapper {
|
||||||
|
cursor: wait;
|
||||||
|
}
|
||||||
|
</style>
|
Loading…
Reference in a new issue