CButton.vue 688 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. <template>
  2. <button class="c-button">
  3. <span v-if="icon" class="icon">{{icon}}</span>
  4. <slot></slot>
  5. </button>
  6. </template>
  7. <script>
  8. export default {
  9. props: ['icon']
  10. }
  11. </script>
  12. <style lang="scss" scoped>
  13. @import '~@/style/theme.scss';
  14. button {
  15. border: none;
  16. outline: none;
  17. background: transparent;
  18. cursor: pointer;
  19. -webkit-tap-highlight-color: transparent;
  20. display: block;
  21. min-width: 120px;
  22. height: 40px;
  23. background: $theme-blue;
  24. color: white;
  25. border-radius: 8px;
  26. font-size: 14px;
  27. padding: 0 16px;
  28. font-weight: 600;
  29. &:hover {
  30. background: darken($theme-blue, 5);
  31. }
  32. &:active {
  33. background: darken($theme-blue, 10);
  34. }
  35. }
  36. </style>