mirror of
https://github.com/Dvorinka/swingmusic-extended.git
synced 2026-06-04 04:23:01 +00:00
36 lines
859 B
Vue
36 lines
859 B
Vue
<template>
|
|
<div
|
|
class="play-btn rounded shadow-sm"
|
|
@click="usePlayFrom(source, useQStore, store)"
|
|
></div>
|
|
</template>
|
|
|
|
<script setup lang="ts">
|
|
import { playSources } from "@/composables/enums";
|
|
import useAlbumStore from "@/stores/pages/album";
|
|
import usePlaylistStore from "@/stores/pages/playlist";
|
|
import usePlayFrom from "@/composables/usePlayFrom";
|
|
import useQStore from "@/stores/queue";
|
|
|
|
defineProps<{
|
|
source: playSources;
|
|
store: typeof useAlbumStore | typeof usePlaylistStore;
|
|
}>();
|
|
</script>
|
|
<style lang="scss">
|
|
.play-btn {
|
|
height: 2.25rem;
|
|
background-color: $gray3;
|
|
background-image: url("../../assets/icons/play.svg");
|
|
background-size: 1.75rem;
|
|
background-repeat: no-repeat;
|
|
background-position: 50% 50%;
|
|
transition: all 0.25s ease-in-out;
|
|
aspect-ratio: 1;
|
|
|
|
&:hover {
|
|
background-color: $accent;
|
|
}
|
|
}
|
|
</style>
|