"src/components/src/components/Icon.vue" did not exist on "c017255fdf2b5b5ff436f46465d2650103ad532a"
Icon.vue 875 Bytes
Newer Older
Yoelvis Gonzalez's avatar
Yoelvis Gonzalez committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52
<template>
  <span :class="spanClass">
    <svg
      viewBox="0 0 24 24"
      :width="size"
      :height="size"
      class="inline-block"
    >
      <path :d="path" />
    </svg>
  </span>
</template>

<script>
  import { computed } from 'vue'

  export default {
    name: 'Icon',
    props: {
      path: {
        required: true,
      },
      w: {
        type: String,
        default: 'w-6',
      },
      h: {
        type: String,
        default: 'h-6',
      },
      size: {
        default: 16,
      },
    },
    setup (props) {
      const spanClass = computed(() => {
        return `inline-flex justify-center items-center ${props.w} ${props.h}`
      })

      return { spanClass }
    },
  }
</script>

<style scoped>
/*svg {*/
/*  transform: rotate(var(--r, 0deg)) scale(var(--sx, 1), var(--sy, 1));*/
/*}*/
path {
  fill: currentColor;
}
</style>