ButtonClose.vue 755 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. <template>
  2. <b-button
  3. v-on="$listeners"
  4. v-bind="$attrs"
  5. variant="link"
  6. class="btn-close"
  7. aria-label="Fermer"
  8. >
  9. <svg aria-hiden="true" viewBox="0 0 20 20">
  10. <path d="m 2.5,2.5 L17.5,17.5" />
  11. <path d="m 17.5,2.5 L2.5,17.5" />
  12. </svg>
  13. </b-button>
  14. </template>
  15. <script>
  16. export default {
  17. name: 'ButtonClose'
  18. }
  19. </script>
  20. <style lang="scss" scoped>
  21. .btn-close {
  22. padding: 3px;
  23. width: $btn-size;
  24. height: $btn-size;
  25. border: 0;
  26. line-height: 0;
  27. &:hover,
  28. &:focus {
  29. path {
  30. stroke: $black;
  31. }
  32. }
  33. svg {
  34. width: 100%;
  35. height: 100%;
  36. pointer-events: none;
  37. }
  38. path {
  39. fill: none;
  40. stroke: lighten($black, 15%);
  41. stroke-width: 4px;
  42. stroke-linecap: round;
  43. }
  44. }
  45. </style>