<template>
  <div
    v-if="name"
    :class="[
        `${$classPrefix}-icon`,
        {
          'left': left,
          'right': right
        }
    ]"
    v-html="iconSvg"
  ></div>
</template>

<script>
import feather from "feather-icons";

export default {
  name: "IrbisIcon",

  props: {
    name: {
      type: String,
      default: null
    },
    left: Boolean,
    right: Boolean
  },

  computed: {
    iconSvg: function() {
      return this.name ? feather.icons[this.name].toSvg() : null;
    }
  }
};
</script>