<template>
  <div
    :class="[
      liked ? 'text-red' : 'text-gray-light',
      'flex items-center',
    ]"
  >
    <button @click.stop="likeFeed" class="default">
      <svg class="w-5 h-5 flex-shrink-0">
        <use xlink:href="#heart"></use>
      </svg>
    </button>
    <span v-show="likes" class="ml-2 text-sm">{{
      likes
    }}</span>
  </div>
</template>

<script>
export default {
  components: {

   },
   emits:['likeFeed'],
  props: {
    likes: Number,
    liked: Boolean,
  },
  methods:{
      likeFeed(){
        this.$emit('likeFeed');
      }
  }
};
</script>
