2024-04-04 22:20:42 +00:00
|
|
|
<template>
|
|
|
|
<div :class="`as-${viewMode}`" class="grid gap-5 p-6">
|
|
|
|
<slot />
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
2024-04-23 21:01:27 +00:00
|
|
|
<script lang="ts" setup>
|
2024-04-04 22:20:42 +00:00
|
|
|
import { toRefs } from 'vue'
|
|
|
|
|
|
|
|
const props = withDefaults(defineProps<{ viewMode?: ArtistAlbumViewMode }>(), {
|
|
|
|
viewMode: 'thumbnails'
|
|
|
|
})
|
|
|
|
|
|
|
|
const { viewMode } = toRefs(props)
|
|
|
|
</script>
|
|
|
|
|
2024-04-23 21:01:27 +00:00
|
|
|
<style lang="postcss" scoped>
|
2024-04-04 22:20:42 +00:00
|
|
|
div {
|
|
|
|
grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
|
|
|
|
}
|
|
|
|
|
|
|
|
div.as-list {
|
|
|
|
@apply gap-x-4 gap-y-3 content-start;
|
|
|
|
grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
|
|
|
|
}
|
|
|
|
</style>
|