koel/resources/assets/js/components/ui/skeletons/GenreItemSkeleton.vue

32 lines
515 B
Vue
Raw Normal View History

2022-10-21 20:06:43 +00:00
<template>
<article class="skeleton pulse" :style="{ width: `${width}px` }">
2022-12-02 16:17:37 +00:00
<span class="name" />
<span class="count pulse" />
2022-10-21 20:06:43 +00:00
</article>
</template>
<script lang="ts" setup>
const width = Math.random() * 100 + 80
</script>
<style lang="scss" scoped>
.skeleton {
display: flex;
border-radius: 999rem;
overflow: hidden;
height: 28px;
margin: .4rem;
padding: 4px;
flex-shrink: 0;
.name {
flex: 1;
}
.count {
aspect-ratio: 1.2/1;
border-radius: 9999rem;
}
}
</style>