<template>
  <!-- eslint-disable-next-line vue/no-deprecated-dollar-listeners-api -->
  <svg aria-hidden="true" class="icon" v-bind="$attrs" v-on="$listeners">
    <use :xlink:href="`#icon-${name}`" />
  </svg>
</template>

<script>
export default {
  name: 'Icon',
  props: {
    name: {
      type: String,
      default: '',
    },
  },
};
</script>

<style scoped>
.icon {
  display: initial;
  width: 1em;
  height: 1em;
  vertical-align: -0.15em;
  fill: currentColor;
  overflow: hidden;
}
</style>
