Advertisement
Guest User

Untitled

a guest
Mar 23rd, 2017
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.85 KB | None | 0 0
  1. <template>
  2. <progress
  3. class="progress"
  4. :max="max"
  5. :value="percent"
  6.  
  7. v-if="percent > 0"
  8. />
  9. </template>
  10.  
  11. <script>
  12. // Usage: <ProgressBar :percent="25" />
  13. export default {
  14. name: 'progress-bar',
  15. props: {
  16. percent: {
  17. type: Number,
  18. required: false,
  19. default: 0
  20. },
  21. max: {
  22. type: Number,
  23. required: false,
  24. default: 100
  25. }
  26. }
  27. }
  28. </script>
  29.  
  30. <style lang="scss">
  31. @import '~sass/tools';
  32.  
  33. .progress {
  34. position: relative;
  35. width: 100%;
  36. height: 10px;
  37. margin: 15px 0;
  38. color: cc(highlight);
  39. fill: cc(highlight);
  40. border: 1px solid cc(bg);
  41. &::-webkit-progress-bar {
  42. background-color: cc(bg);
  43. border: none;
  44. box-shadow: 0 0 0 1px cc(border) inset;
  45. }
  46. &::-webkit-progress-value {
  47. background-color: cc(highlight);
  48. border: none;
  49. }
  50. }
  51.  
  52. </style>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement