<template>
  <div class="columnSmall">
    <div class="title">
      <div class="t-l">
        <h2>{{ title }}</h2>
        <slot name="headRight"></slot>
      </div>
      <slot name="titleRight"></slot>
    </div>
    <div class="content" :style="{ padding: padding }">
      <slot></slot>
    </div>
  </div>
</template>

<script>
export default {
  name: 'column-small-view',
  props: {
    title: {
      type: String,
      default: ''
    },
    padding: {
      type: String,
      default: '24px 24px 12px 24px'
    }
  }
}
</script>

<style scoped lang="less">
.columnSmall {
  border-radius: 8px 8px 8px 8px;
  box-shadow: 0 2px 4px 1px rgba(28, 41, 90, 0.04);
  background: #ffffff;
  margin-bottom: 16px;
  .t-l {
    height: 54px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid #e9e9e9;
    justify-content: space-between;

    h2 {
      line-height: 1;
      padding: 0 24px;
      color: rgba(0, 0, 0, 0.85);
      font-size: 16px;
      font-weight: bold;
    }
  }
}
</style>
