<template>
  <div class="ui-dataset-item">
    <span class="ui-dataset-item__label" :style="{'width': labelWidth}">
      {{ label }}
    </span>
    <span class="ui-dataset-item__target">
      <slot></slot>
    </span>
  </div>
</template>
<script>
export default {
  name: 'UiDatasetItem',
  inject: ['UiDataset'],
  props: {
    label: {
      type: String
    }
  },
  computed: {
    labelWidth() {
      return this.UiDataset.labelWidth
    }
  }
}
</script>
<style lang="less">
.ui-dataset-item{
  min-height: 24px;
  line-height: 24px;
  padding-top: 3px;
  padding-bottom: 3px;
  display: flex;
  flex-direction: row;
}
.ui-dataset-item__label{
  color: #606C80;
  display: inline-block;
  margin-right: 18px;
}
</style>
