All files optgroup.vue

0% Statements 0/2
100% Branches 0/0
0% Functions 0/2
0% Lines 0/2
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43                                                                                     
<template>
  <div class="v-optgroup" :class="state" :style="{ 'padding-left': `${12 + 12 * group.state.depth}px` }">
    <div class="label" v-html="group.label"></div>
  </div>
</template>
 
<script type="text/javascript">
export default {
  name: 'VOptgroup',
  props: {
    group: {
      type: Object,
      required: true
    }
  },
  computed: {
    aria: function(){
      return {} // What aria attributes are associated with optgroups
    },
    state: function(){
      return {
        'is-disabled': this.group.disabled
      }
    }
  }
}
</script>
 
<style lang="scss" scoped>
.v-optgroup {
  padding: 8px 12px;
 
  &.is-disabled {
    opacity: 0.7;
  }
}
 
.label {
  white-space: nowrap;
  user-select: none;
}
</style>