<template>
  <div class="title-over-border">
    <div class="title-over-border-title">
      <slot name="title">
        {{ title }}
      </slot>
    </div>
    <div class="title-over-border-content">
      <slot />
    </div>
  </div>
</template>

<script>
export default {
  props: {
    title: {
      type: String
    }
  }
}
</script>

<style lang="less" scoped>
@color: rgba(12, 235, 201, 0.6);
.title-over-border {
  border: 1px solid @color;
  position: relative;

  &-title {
    color: @color;
    background-color: #022024;
    position: absolute;
    top: -11px;
    left: 10px;
    padding: 0 10px;
  }

  &-content {
    height: 100%;
    padding: 20px;
  }
}
</style>
