Skip to content

Commit

Permalink
fix(VsImage): add skeleton props (215719) (chromatic-build)
Browse files Browse the repository at this point in the history
  • Loading branch information
smithoo committed Aug 26, 2024
1 parent 3280a38 commit c6ffd6e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions packages/vlossom/src/components/vs-image/VsImage.vue
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<template>
<div class="vs-image" ref="vsImageRef" :style="computedStyleSet">
<vs-skeleton
v-if="isLoading"
v-if="skeleton && isLoading"
class="vs-image-skeleton"
:style="{ width: 'var(--vs-image-width)', height: 'var(--vs-image-height)' }"
>
<slot name="loading" />
<slot name="skeleton" />
</vs-skeleton>
<img
:class="['vs-image-tag', { 'vs-hidden': isLoading }]"
Expand Down Expand Up @@ -37,6 +37,7 @@ export default defineComponent({
alt: { type: String, default: '' },
fallback: { type: String, default: '' },
lazy: { type: Boolean, default: false },
skeleton: { type: Boolean, default: false },
src: { type: String, required: true, default: '' },
},
emits: ['error'],
Expand Down

0 comments on commit c6ffd6e

Please sign in to comment.