<template>
  <div class="spinner">
    <div v-for="(bounce, index)  in 3" :key="index" :class="`bounce${index}`"></div>
  </div>
</template>

<script>
export default {
  name: 'bubble-line-loader',
}
</script>


<style lang="scss" scoped>
.spinner {
  width: 50px;
  display: flex;
  justify-content: space-between;
  margin: 10px;
  > div {
    width: 10px;
    height: 10px;
    background-color: $color-primary;

    border-radius: 100%;
    display: inline-block;
    -webkit-animation: sk-bouncedelay 1.4s infinite ease-in-out both;
    animation: sk-bouncedelay 1.4s infinite ease-in-out both;

    &.bounce1 {
      -webkit-animation-delay: -0.32s;
      animation-delay: -0.32s;
    }

    &.bounce2 {
      -webkit-animation-delay: -0.16s;
      animation-delay: -0.16s;
    }
  }
}

@-webkit-keyframes sk-bouncedelay {
  0%, 80%, 100% { -webkit-transform: scale(0) }
  40% { -webkit-transform: scale(1.0) }
}

@keyframes sk-bouncedelay {
  0%, 80%, 100% { 
    -webkit-transform: scale(0);
    transform: scale(0);
  } 40% { 
    -webkit-transform: scale(1.0);
    transform: scale(1.0);
  }
}
</style>

