<template>
  <div class="app-card">
    <div class="app-card-hd">
      <slot name="header">
        <h2 class="app-card-hd__title" v-if="title">{{ title }}</h2>
        <slot name="header-aside"></slot>
      </slot>
    </div>
    <div class="app-card-bd">
      <slot></slot>
    </div>
  </div>
</template>

<script>
export default {
  name: 'AppCard',
  props: { title: String }
}
</script>

<style>
.app-card {
  background: #ffffff;
  box-shadow: 0 1px 6px 0 rgb(228 232 235 / 20%);
  border-radius: 8px;
  margin-bottom: 20px;
  padding: 32px;
}
.app-card-hd {
  display: flex;
}
.app-card-hd__title {
  flex: 1;
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 16px;
}
</style>
