<template>
  <svg
    class="adb-icon"
    aria-hidden="true"
    :class="className"
    xmlns="http://www.w3.org/2000/svg"
  >
    <use :xlink:href="iconName" />
  </svg>
</template>

<script>
export default {
  name: 'AdbIcon',
  props: {
    className: {
      type: String,
      default: '',
    },
    iconClass: {
      type: String,
      default: '',
      required: true,
    },
  },
  computed: {
    iconName() {
      return `#${this.iconClass}`;
    },
  },
};
</script>

<style lang="scss" scoped>
.adb-icon {
  width: 1em;
  height: 1em;
  vertical-align: -0.15em;
  fill: currentColor;
  overflow: hidden;
}
</style>
