All files / select/src/components/select/components optgroup.vue

100% Statements 1/1
100% Branches 0/0
100% Functions 0/0
100% Lines 1/1
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              1x                                                                  
<template>
  <div class="v-optgroup" :class="{ 'is-disabled': group.disabled }" :style="{ 'padding-left': `${12 * group.state.depth}px` }">
    <div class="label" v-html="group.label"></div>
  </div>
</template>
 
<script type="text/javascript">
import VOption from './option.vue'
 
export default {
  name: 'VOptgroup',
  props: {
    group: {
      type: Object,
      required: true
    }
  }
}
</script>
 
<style lang="scss" scoped>
.v-optgroup {
  &.is-disabled {
    opacity: .7;
  }
}
 
.label {
  white-space: nowrap;
  user-select: none;
  pointer-events: none;
  font-size: 14px;
  font-weight: bold;
  padding: 8px 12px;
}
 
.options {
  display: block;
}
</style>