<script setup lang="ts"></script>

<template>
  <li class="van-timeline-item">
    <div class="van-timeline-item__tail" />
    <div class="van-timeline-item__icon">
      <slot name="icon"></slot>
    </div>
    <div class="van-timeline-item__wrapper">
      <slot />
    </div>
  </li>
</template>

<style scoped lang="less">
.van-timeline-item {
  position: relative;
  padding-bottom: 20px;
  &:last-child {
    .van-timeline-item__tail {
      display: none;
    }
  }

  .van-timeline-item__tail {
    position: absolute;
    left: 4px;
    height: 100%;
    border-left: 2px solid var(--van-border-color);
  }
  .van-timeline-item__icon {
    border-radius: 50%;
    border: 1px solid var(--van-border-color);
    padding: 0 !important;
    background-color: var(--van-background);
    color: var(--van-gray-5);

    position: absolute;
    top: 5.5px;
    left: 5px;
    height: auto;
    width: auto;
    margin-top: 0;
    line-height: 0;
    text-align: center;
    transform: translate(-50%, -50%);
  }
  .van-timeline-item__wrapper {
    position: relative;
    // padding-left: 28px;
    top: -2px;
    margin: 0 0 0 26px;
    word-break: break-word;
    font-size: var(--van-font-size-xs);
  }
}
</style>
