<template>
  <div class="app-title-bar">
    <div :style="{ 'font-size': `${size}px` }" class="app-title-bar-title-text">
      <slot>{{ title }}</slot>
    </div>
    <div class="app-title-bar-right-area">
      <slot name="right-area" />
    </div>
  </div>
</template>

<script>
export default {
  props: {
    title: {
      type: String,
      default: '',
    },
    size: {
      type: Number,
      default: 18,
    },
  },
};
</script>

<style lang="scss" scoped>
.app-title-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  &-right-area {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
  }
  &-title-text {
    font-weight: bold;
    color: #1e2128;
    line-height: 20px;
    position: relative;
    padding-left: 11px;

    &::before {
      content: '';
      display: block;
      position: absolute;
      left: 0;
      top: 50%;
      transform: translateY(-50%);
      height: 70%;
      width: 3px;
      background: #1890ff;
    }
  }
}
</style>
