<!-- -->
<template>
  <div class="entrance">
    <div class="entrance-text" :style="{ color }">点击进入</div>
    <div class="entrance-icon" :style="{ background: color }">
      <span class="entrance-arrow" :style="{ background: color }"></span>
    </div>
  </div>
</template>

<script>
export default {
  name: "EntranceIcon",
  props: {
    color: String,
  },
  data() {
    return {};
  },
  mounted() {},
  methods: {},
};
</script>

<style lang="scss" scoped>
.entrance {
  display: flex;
  font-size: 16px;
  cursor: pointer;
  align-items: center;
  .entrance-text {
    margin-right: 12px;
    font-size: 14px;
  }
  &:hover {
    .entrance-icon {
      width: 100px;
    }
  }
}
.entrance-icon {
  width: 50px;
  height: 2px;
  background: #000;
  transition: all 0.5s cubic-bezier(0.7, -0.5, 0.2, 2);
  position: relative;
  transform: translateY(3px);
  .entrance-arrow {
    display: inline-block;
    width: 16px;
    height: 2px;
    transform: rotate(45deg);
    position: absolute;
    right: -2px;
    top: -5px;
  }
}
</style>
