<template>
  <div class="lds-ring">
    <div v-for="(ring, index) in 4" :key="index"></div>
  </div>
</template>

<script>
export default {
  name: 'ring-loader'
}
</script>


<style lang="scss" scoped>
.lds-ring {
  display: inline-block;
  position: relative;
  width: 64px;
  height: 64px;
  bordeR: 2px solid $color-grey-septenary;
  border-radius: 50%;
  margin: 10px;
  div {
    box-sizing: border-box;
    display: block;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 64px;
    height: 64px;
    border: 2px solid $color-primary;
    border-radius: 50%;
    animation: lds-ring 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite;
    border-color: $color-primary transparent transparent transparent;
    &:nth-child(1) {
      animation-delay: -0.45s;
    }
    &:nth-child(2) {
      animation-delay: -0.3s;
    }
    &:nth-child(3) {
      animation-delay: -0.15s;
    }
  }
}

@keyframes lds-ring {
  0% {
    transform: translate(-50%, -50%) rotate(0deg);
  }
  100% {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}
</style>

