loader.vue 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. <template lang='pug'>
  2. v-dialog(v-model='value', persistent, max-width='350')
  3. v-card.loader-dialog.radius-7(:color='color', dark)
  4. v-card-text.text-xs-center.py-4
  5. atom-spinner.is-inline(
  6. v-if='mode === `loading`'
  7. :animation-duration='1000'
  8. :size='60'
  9. color='#FFF'
  10. )
  11. img(v-else-if='mode === `icon`', :src='`/svg/icon-` + icon + `.svg`', :alt='icon')
  12. .subheading {{ title }}
  13. .caption {{ subtitle }}
  14. </template>
  15. <script>
  16. import { AtomSpinner } from 'epic-spinners'
  17. export default {
  18. components: {
  19. AtomSpinner
  20. },
  21. props: {
  22. value: {
  23. type: Boolean,
  24. default: false
  25. },
  26. color: {
  27. type: String,
  28. default: 'blue darken-3'
  29. },
  30. title: {
  31. type: String,
  32. default: 'Working...'
  33. },
  34. subtitle: {
  35. type: String,
  36. default: 'Please wait'
  37. },
  38. mode: {
  39. type: String,
  40. default: 'loading'
  41. },
  42. icon: {
  43. type: String,
  44. default: 'checkmark'
  45. }
  46. }
  47. }
  48. </script>
  49. <style lang='scss'>
  50. .loader-dialog {
  51. .atom-spinner.is-inline {
  52. display: inline-block;
  53. }
  54. .caption {
  55. color: rgba(255,255,255,.7);
  56. }
  57. img {
  58. width: 80px;
  59. }
  60. }
  61. </style>