LoadingIcon.vue 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. <template>
  2. <div
  3. class='loading_icon'
  4. :class='{"loading_icon--dark": dark }'
  5. >
  6. <span></span>
  7. <span></span>
  8. <span></span>
  9. </div>
  10. </template>
  11. <script>
  12. export default {
  13. name: 'LoadingIcon',
  14. props: ['dark']
  15. }
  16. </script>
  17. <style lang='scss'>
  18. @import '../assets/scss/variables.scss';
  19. @keyframes loading {
  20. 0% {
  21. transform: scale(0.75);
  22. }
  23. 50% {
  24. transform: scale(1.25);
  25. }
  26. 100% {
  27. transform: scale(0.75);
  28. }
  29. }
  30. .loading_icon {
  31. transition: all 0.2s;
  32. display: flex;
  33. justify-content: center;
  34. align-items: center;
  35. pointer-events: none;
  36. @at-root #{&}--dark {
  37. span {
  38. background-color: $color__darkgray--primary !important;
  39. }
  40. }
  41. span {
  42. height: 0.5rem;
  43. width: 0.5rem;
  44. display: inline-block;
  45. border-radius: 100%;
  46. background-color: rgba(256,256,256,0.9);
  47. animation-name: loading;
  48. animation-duration: 1s;
  49. animation-timing-function: linear;
  50. animation-iteration-count: infinite;
  51. margin: 0 0.25rem;
  52. &:nth-child(2n) { animation-delay: 0.333s; }
  53. &:nth-child(3n) { animation-delay: 0.666s; }
  54. }
  55. }
  56. </style>