<template>
  <div :class="{'basic-container--block': block}" class="basic-container">
    <el-card class="flex-container">
      <slot />
    </el-card>
  </div>
</template>

<script>
export default {
  name: 'BasicContainer',
  props: {
    block: {
      type: Boolean,
      default: false
    }
  }
};
</script>

<style lang="scss">
.basic-container {
  padding: 8px 10px;
  border-radius: 10px;
  box-sizing: border-box;
  .flex-container {
    max-height: calc(100vh - 120px);
    overflow-y: auto;
  }

  .el-card {
    width: 100%;
  }
  &:first-child {
    padding-top: 0;
  }
  &--block {
    height: 100%;
    /* .el-card {
      height: 100%;
    } */
  }
}
</style>
