frontend/src/components/CardComponent.vue

43 lines
786 B
Vue
Raw Normal View History

2019-07-07 19:44:33 +02:00
<template>
<div class="card" :class="{black: !isBlack}">
<span class="text">{{ text }}</span>
<span class="bottom-text">Cards Against Idiots</span>
</div>
</template>
<script lang="ts">
import { Component, Prop, Vue } from "vue-property-decorator";
@Component
export default class CardComponent extends Vue {
@Prop()
private text!: string;
@Prop()
private isBlack!: boolean;
}
</script>
<style scoped>
.card{
width: 13em;
height: 17em;
border: solid black;
border-radius: 12px;
padding-top: 1em;
background: white;
}
.bottom-text {
display: block;
position: relative;
top: 13em;
font-style: italic;
}
.black {
background-color: black;
color: white;
}
</style>