<template>
  <div class="icon-image">
    <img :src="imageSrc" :alt="alt" />
  </div>
</template>

<script>
import { mapGetters } from 'vuex'
export default {
  props: {
    name: {
      type: String,
      default: '',
    },
    alt: {
      type: String,
      default: '',
    },
  },
  computed: {
    ...mapGetters(['static']),
    imageSrc() {
      return this.static + '/' + this.name
    },
  },
}
</script>

<style scoped lang="scss">
.icon-image {
  img {
    display: block;
    width: 100%;
    height: 100%;
  }
}
</style>
