<template>
  <div v-show="show" :class="{'ivr-btn':true,'ivr-btn-active':!disabled,'ivr-btn-disabled':disabled}" @click="click">
    <svg-icon :icon-class="icon" class="ivr-icon"/>
    <slot/>
  </div>
</template>

<script>
export default {
  name: 'IvrBtn',
  props: {
    show: {
      type: Boolean,
      default: true
    },
    disabled: {
      type: Boolean,
      default: false
    },
    icon: {
      type: String,
      default: ''
    }
  },
  methods: {
    click() {
      this.$emit('click')
    }
  }
}
</script>

<style scoped>
  .ivr-btn{
    width:50px;
    display: inline-block;
    line-height: 1;
    white-space: nowrap;
    cursor: pointer;
    background-color:transparent;
    border-style:none;
    color: #ffffff;
    -webkit-appearance: none;
    text-align: center;
    -webkit-box-sizing: border-box;
    box-sizing: border-box;
    outline: none;
    margin: 0;
    -webkit-transition: .1s;
    transition: .1s;
    font-weight: 500;
    -moz-user-select: none;
    -webkit-user-select: none;
    -ms-user-select: none;
    padding: 3px 3px;
    font-size: 12px;
  }
  .ivr-btn-active:hover{
    color: #5dc8d7
  }
  .ivr-btn-disabled{
    color:#e1e1e1
  }
  .ivr-icon{
    width: 100%;
    text-align: center;
    display: block;
    font-size: 25px;
    margin: auto;
    margin-bottom: 3px;
  }

</style>
