41 lines
785 B
Vue
41 lines
785 B
Vue
<script setup lang="ts">
|
|
import type { Card } from '~/netcode/Card';
|
|
|
|
export interface Props {
|
|
stack: (Card | null)[]
|
|
}
|
|
|
|
const props = withDefaults(defineProps<Props>(), {
|
|
stack: () => [],
|
|
})
|
|
|
|
</script>
|
|
|
|
<template>
|
|
<div>
|
|
<div class="cards_container">
|
|
<template v-if="props.stack.length > 0" v-for="c in props.stack">
|
|
<CardPreview :card_id="c?.card_id" :wrapped="true">
|
|
<slot></slot>
|
|
</CardPreview>
|
|
</template>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
</template>
|
|
|
|
<style scoped>
|
|
.cards_container::before {
|
|
width: calc(185px - 10px);
|
|
display: block;
|
|
content: "";
|
|
height: 0;
|
|
}
|
|
|
|
.cards_container {
|
|
display: flex;
|
|
flex-direction: row-reverse;
|
|
justify-content: center;
|
|
}
|
|
</style> |