Skip to content
This repository was archived by the owner on May 7, 2021. It is now read-only.

Commit f4c1ef9

Browse files
committed
Change Impl: CSS switching
1 parent 4243ae2 commit f4c1ef9

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

src/components/LoadingIndicator.vue

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<template>
22
<div class="loading-indicator-container">
3-
<div v-if="isLoading" class="loading-indicator"></div>
3+
<div :class="[ isLoading ? 'loading-indicator-active' : 'loading-indicator-inactive' ]"></div>
44
</div>
55
</template>
66

@@ -20,7 +20,13 @@ export default {
2020
width: 100%;
2121
}
2222
23-
.loading-indicator {
23+
.loading-indicator-inactive {
24+
height: 100%;
25+
width: 0;
26+
margin-left: 0;
27+
}
28+
29+
.loading-indicator-active {
2430
height: 100%;
2531
background-color: cornflowerblue;
2632
animation: loading 1.5s linear infinite;

0 commit comments

Comments
 (0)