<template>
  <div :class="['th-menu-item', {disabled: disabled}]" @click.stop="onClick" :style="`color: ${color};`">
    <Icon :custom="`iconfont icon-${icon}`" size="18"/>
    <span>{{name}}</span>
  </div>
</template>

<script>
export default {
  props: ['disabled', 'name', 'icon', 'color'],
  methods: {
    onClick(e) {
      if (!this.disabled) {
        this.$emit('on-click', e)
      }
    }
  }
}  
</script>
