<template>
  <div class="form-title" :style="{ background: bgColor }">
    <slot />
  </div>
</template>

<script lang="ts" setup>
  defineProps({
    /** 背景色 */
    bgColor: {
      type: String,
      default: '#f7f9fc',
    },
  })
</script>

<style lang="scss" scoped>
  .form-title {
    border-radius: 4px;
    font-size: 14px;
    padding: 8px 0;
    margin-bottom: 10px;
    color: #23272e;
    font-weight: 500;
    &::before {
      content: '';
      background-color: #1e6ffa;
      width: 3px;
      height: 13px;
      display: inline-block;
      margin-right: 8px;
      position: relative;
      top: 2px;
    }
  }
</style>
