Files
front/components/CardSlot.vue
T

31 lines
664 B
Vue

<script setup lang="ts">
import type { Card } from '~/netcode/Card';
export interface Props {
stack: (Card | null)[]
}
const props = withDefaults(defineProps<Props>(), {
stack: () => [],
})
const unwrapped = ref(false)
</script>
<template>
<div>
<input type="checkbox" v-model="unwrapped" class="checkbox" />
<div class="cards_container">
<template v-if="props.stack.length > 0" v-for="c in props.stack">
<CardPreview :data="c" :wrapped="!unwrapped">
<slot></slot>
</CardPreview>
</template>
</div>
</div>
</template>
<style scoped></style>