<template>
  <div class="panel">
    <div class="panel-title" :style="{'background':background}">{{title}}</div>
    <div class="panel-body">
      <slot></slot>
    </div>
  </div>
</template>
<script>
export default {
  name: 'Panel',
  props: ['title','background'],
  data() {
    return {}
  }
}
</script>
<style lang='scss' scoped>
.panel {
  display: flex;
  flex-direction: column;
  .panel-title {
    background: linear-gradient(180deg, #f1f5ff 0%, #ffffff 100%);
    border-radius: 8px 8px 0px 0px;
    border: 3px solid #ffffff;
    padding: 20px;
    font-weight: 500;
    font-size: 20px;
    color: #212121;
    position: relative;
    &::after{
      content: '';
      position: absolute;
      bottom: 0;
      left: 20px;
      right: 20px;
      height: 1px;
      background: #E8E8E8;
    }
  }
  .panel-body {
    flex: 1;
    background: #fff;
  }
}
</style>
