mirror of
https://github.com/Dvorinka/swingmusic-extended.git
synced 2026-06-04 20:43:04 +00:00
break down search component into smaler components
This commit is contained in:
@@ -0,0 +1,50 @@
|
||||
<template>
|
||||
<div class="artists-results border">
|
||||
<div class="heading">😳 ARTISTS</div>
|
||||
<div class="grid">
|
||||
<ArtistCard
|
||||
v-for="artist in artists"
|
||||
:key="artist"
|
||||
:artist="artist"
|
||||
/>
|
||||
</div>
|
||||
<LoadMore v-if="more" @loadMore="loadMore" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import ArtistCard from "@/components/shared/ArtistCard.vue";
|
||||
import LoadMore from "./LoadMore.vue";
|
||||
|
||||
export default {
|
||||
props: ["artists", "more"],
|
||||
components: {
|
||||
ArtistCard,
|
||||
LoadMore,
|
||||
},
|
||||
setup(props, { emit }) {
|
||||
function loadMore() {
|
||||
emit("loadMore");
|
||||
}
|
||||
|
||||
return {
|
||||
loadMore,
|
||||
};
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.right-search .artists-results {
|
||||
border-radius: 0.5rem;
|
||||
background: #1214178c;
|
||||
margin: 0 0 0 $small;
|
||||
padding: $small 0;
|
||||
|
||||
.grid {
|
||||
padding: 0 0 0 $small;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user