<template>
  <span class="uif-button-group">
    <u-button v-for="(menu, idx) in menus" :key="idx" type="primary" v-bind="menu"
              @click="onClick(menu)">{{menu.label}}</u-button>
  </span>
</template>

<script>
import UButton from '@uif/hq/lib/components/button'
export default {
  name: 'u-button-group',
  components: {
    UButton
  },
  props: {
    menus: {
      type: Array,
      default () {
        return []
      }
    }
  },
  methods: {
    onClick (menu) {
      this.$emit('click', menu)
    }
  }
}
</script>
