<template>
<div class="card-wrapper">
  <div class="card-title">
    <img v-if="icon" :src="icon"/>
    {{title}}
  </div>
  <div class="card-content">
    <slot />
  </div>
</div>
</template>

<script>
export default {
  name: 'Mode5',
  props: {
    icon: {},
    title: {
      type: String,
      default: '标题',
    },
    color: {
      type: String,
    },
  },
}
</script>

<style lang="stylus" scoped>
.card-wrapper
  padding 1rem 1rem 0 !important
  background $cardBg
  .card-title
    display flex
    align-items center
    background-color $black
    color #fff
    font-size 1rem
    font-weight bold
    width 100%
    height 2.4rem
    padding 0 1rem
    >img
      width 1.4rem
      height @width
      margin-right 0.5rem
  .card-content
    padding .5rem 0
</style>
