Skip to content

Commit fb9eff1

Browse files
committed
BSkeleton: support for no animation.
1 parent fc6fca6 commit fb9eff1

File tree

3 files changed

+6
-5
lines changed

3 files changed

+6
-5
lines changed

src/App.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -133,9 +133,9 @@
133133

134134
<h5 class="mt-3">None</h5>
135135
<b-card>
136-
<b-skeleton width="85%"></b-skeleton>
137-
<b-skeleton width="55%"></b-skeleton>
138-
<b-skeleton width="70%"></b-skeleton>
136+
<b-skeleton animation width="85%"></b-skeleton>
137+
<b-skeleton animation width="55%"></b-skeleton>
138+
<b-skeleton animation width="70%"></b-skeleton>
139139
</b-card>
140140
<b-table-simple responsive>
141141
<b-thead>

src/components/BSkeleton/BSkeleton.vue

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,9 @@ const props = withDefaults(defineProps<BSkeletonProps>(), {
2323
2424
const classes = computed(() => [
2525
`b-skeleton-${props.type}`,
26-
`b-skeleton-animate-${props.animation}`,
2726
{
27+
[`b-skeleton-animate-${props.animation}`]:
28+
typeof props.animation === 'boolean' ? undefined : props.animation,
2829
[`bg-${props.variant}`]: props.variant,
2930
},
3031
])

src/types/SkeletonAnimation.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
type SkeletonAnimation = 'wave' | 'fade' | 'throb'
1+
type SkeletonAnimation = boolean | 'wave' | 'fade' | 'throb'
22

33
export default SkeletonAnimation

0 commit comments

Comments
 (0)