<template>
  <view class="info-left">
    <view class="info-electric">
      <view><text>{{num}}</text></view>
      <view>{{unit}}</view>
    </view>
    <view class="line"><text></text><text></text></view>
    <view class="info-text">{{text}}</view>
  </view>
</template>

<script>
export default {
  name: "BatteryInfo",
  props:["num","unit","text"]
};
</script>

<style lang="scss" scoped>
.info-left {
  display: flex;
  flex-direction: column;
  width: 46%;
  margin-bottom: 12px;
  .info-electric {
    width: 100%;
    display: flex;
    justify-content: space-between;
    height: 10px;

    view:first-child {
      border: #1a222f solid 1px;
      background-color: #0e1420;
      height: 10px;
      color: white;
      border-radius: 8px;
      font-size: 16px;
      font-weight: 600;
      width: 80%;

      text {
        position: relative;
        bottom: 5px;
      }
    }

    view:last-child {
      position: relative;
      bottom: 1px;
      font-weight: 600;
      font-size: 16px;
    }
  }
  .line {
    display: flex;
    margin-top: 5px;
    :first-child {
      width: 2%;
      background-color: white;
      height: 2px;
    }
    :last-child {
      height: 2px;
      width: 96%;
      background-color: #14172a;
      margin-left: 5px;
    }
  }
  .info-text {
    width: 100%;
    margin-top: 3px;
  }
}
</style>