implement favoriting artists

This commit is contained in:
geoffrey45
2022-12-27 20:16:02 +03:00
committed by Mungai Njoroge
parent f7a054d569
commit a0cf95024c
8 changed files with 68 additions and 30 deletions
+14 -2
View File
@@ -1,14 +1,26 @@
<template>
<button class="heart-button circular"><HeartSvg /></button>
<button class="heart-button circular" @click="emit('handleFav')">
<HeartFillSvg v-if="state" />
<HeartSvg v-else />
</button>
</template>
<script setup lang="ts">
import HeartSvg from "@/assets/icons/heart.svg";
import HeartFillSvg from "@/assets/icons/heart.fill.svg";
defineProps<{
state: boolean | undefined;
}>();
const emit = defineEmits<{
(event: "handleFav"): void;
}>();
</script>
<style lang="scss">
.heart-button {
$bg: rgb(247, 149, 149);
$bg: rgb(255, 184, 184);
background: $bg;
align-items: center;
padding: 0 1rem;