<template>
  <div class="bi-user-dynamic">
    <span class="bi-user-dynamic__avatar">
      <bi-user-avatar size="small" :src="avatar"></bi-user-avatar>
    </span>
    <div class="bi-user-dynamic__main">
      <div class="bi-user-dynamic__info" v-html="title"></div>
      <div class="bi-user-dynamic__detail" v-if="detail && detail.length">
        <p
          class="bi-user-dynamic__detail-item"
          v-for="(item, index) in detail"
          :key="index"
        >{{item}}</p>
      </div>
    </div>
  </div>
</template>
<script>
import BiUserAvatar from '@huntianning/components/packages/user-avatar'

export default {
  name: 'BiUserDynamic',
  components: {
    BiUserAvatar
  },
  props: {
    avatar: {
      type: String
    },
    title: {
      type: String
    },
    detail: {
      type: Array
    }
  }
}
</script>
<style lang="less">
.bi-user-dynamic {
  display: flex;
  flex-direction: row;
  line-height: 1.5em;
}
.bi-user-dynamic__avatar {
  min-width: 28px;
  width: 28px;
  height: 28px;
  display: inline-block;
  border-radius: 50%;
  background-color: #5E6576;
  margin-right: 18px;
}
.bi-user-dynamic__info{
  a {
    color: #3385FF;
    margin: 0 4px;
  }
}
.bi-user-dynamic__detail-item{
  margin: 4px 0 0;
  color: #606C80;
}
</style>
