handle favoriting in album page

+ fix fetching artist albums
+ create favoriteHandler composable
This commit is contained in:
geoffrey45
2022-12-28 09:07:55 +03:00
committed by Mungai Njoroge
parent a0cf95024c
commit d250928573
7 changed files with 69 additions and 51 deletions
+13 -4
View File
@@ -1,5 +1,11 @@
<template>
<button class="heart-button circular" @click="emit('handleFav')">
<button
class="heart-button circular"
@click="emit('handleFav')"
:class="{
is_fav: state,
}"
>
<HeartFillSvg v-if="state" />
<HeartSvg v-else />
</button>
@@ -19,15 +25,18 @@ const emit = defineEmits<{
</script>
<style lang="scss">
$bg: rgb(250, 33, 33);
.heart-button {
$bg: rgb(255, 184, 184);
background: $bg;
align-items: center;
padding: 0 1rem;
gap: $smaller;
border: solid 1px $bg;
background: transparent;
color: rgb(250, 33, 33);
&:hover {
background: $bg;
background: transparent;
}
}
</style>