<template>
  <div class="timing w-full h-10 leading-10 px-4 text-xs">
    <template v-if="voteType">
      离{{ voteType }}还有
      <span class="w-14 h-7 inline-block bg-app-blue-2 text-center text-sm leading-7 rounded">{{ height }}</span>
      个区块  
      ≈<span>4</span>天<span>4</span>小时<span>4</span>分<span>4</span>秒
    </template>
    <template v-else>
      投票已结束
    </template>
  </div>
</template>

<script lang="ts">
import Vue from 'vue'
export default Vue.extend({
  props: {
    height: {
      type: Number
    }
  },
  data() {
    return {
      voteType: '投票结束'
    }
  }
})
</script>

<style scoped>
  .timing {
    background: rgba(255, 255, 255, 0.2);
  }
</style>