<template>
  <div class="svg-button" @click="buttonClick">
    <svg-icon :icon-class="icon" style="width: 24px; height: 20px;" />
    <span class="name">
      <slot />
    </span>
  </div>
</template>

<script>
export default {
  props: {
    icon: {
      type: String,
      default: ''
    }
  },
  methods: {
    buttonClick() {
      this.$emit('click')
    }
  }
}
</script>

<style lang="scss" scoped>
.svg-button {
  display: flex;
  align-items: center;
  cursor: pointer;
  .name {
    margin-left: 5px;
    font-size: 16px;
    color: #222931;
  }
}
</style>
