<template>
  <div class="ImageTextSmallBlock">
    <div>
      <img class="image" :src="image" alt="image" />
      <h3>{{ title }}</h3>
    </div>
    <div>
      <span v-if="date" class="time">{{ date }}</span>
      <img class="more" src="@/assets/images/IconArrowRight.png" alt="更多" />
    </div>
  </div>
</template>

<script setup lang="ts">
defineProps({	
  title : String,
  image: String,
  date: String,
})
</script>

<style lang="scss">
@use '@/assets/scss/colors.scss' as *;

.ImageTextSmallBlock {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  padding: 24px;
  background-color: $box-color;
  border-radius: 5px;
  overflow: hidden;

  &:not(:last-child) {
    border-bottom: 1px solid $border-split-color;
  }

  > div {
    display: flex;
    flex-direction: row;
    align-items: center;
  }

  h3 {
    color: $text-content-color;
    font-size: 1.2rem;
    margin: 0;
    margin-bottom: 8px;
  }

  .image {
    width: 60px;
    margin-right: 15px;
  }

  .time {
    color: $text-content-second-color;
    font-size: 0.85rem;
    margin-right: 16px;
  }

  .more {
    width: 16px;
    height: 16px;
  }
}
</style>