<template>
  <div class="section-content">
    <div class="section-title">
      <i class="section-title-text" :class="icon"></i>
      <div class="section-title-text" style="margin-left: 4px;" v-if="title">{{ title }}</div>
      <div v-if="desc" style="margin-left: 20px;">{{ desc }}</div>
    </div>
    <div class="section-extra" v-if="extra">{{ extra }}</div>
    <div class="section-block"></div>
  </div>
</template>

<script>
export default {
  name: 'SectionTitle',
  props: {
    icon: {
      type: String,
      default: 'el-icon-document'
    },
    title: {
      type: String,
      default: ''
    },
    desc: {
      type: String,
      default: ''
    },
    extra: {
      type: String,
      default: ''
    }
  },
  data() {
    return {}
  }
}
</script>

<style lang="scss" scoped>
.section-content {
  position: relative;
  padding: 10px;
  border-bottom: 1px solid #ccc;
  display: flex;
  align-items: center;
}
.section-title {
  display: flex;
  align-items: center;
  flex-direction: row;
  flex: 1;
  color: #333;

  .section-title-text {
    color: #41B584;
    font-size: 16px;
  }
}
.section-extra {
  color: #999;
}
.section-block {
  position: absolute;
  width: 120px;
  height: 2px;
  background-color: #41B584;
  left: 10px;
  bottom: 0;
}
</style>