inline player hp component
This commit is contained in:
@@ -2,7 +2,9 @@
|
||||
<v-container>
|
||||
<v-row :class="closeClass">
|
||||
<v-sheet v-if="props.dealer && stats.cuffs" class="mr-4 text-button" :elevation="2">CUFFED</v-sheet>
|
||||
<PlayerHP :hp="props.stats.hp" />
|
||||
<v-sheet :elevation="2" width="100" height="30" class="text-center">
|
||||
{{ hpText }}
|
||||
</v-sheet>
|
||||
<v-sheet v-if="!props.dealer && stats.cuffs" class="ml-4 text-button" :elevation="2">CUFFED</v-sheet>
|
||||
</v-row>
|
||||
<v-row class="d-flex flex-fill">
|
||||
@@ -39,5 +41,6 @@ const props = defineProps<Props>();
|
||||
const emit = defineEmits<Emits>();
|
||||
|
||||
const closeClass = computed(() => ({ 'd-flex': true, 'justify-end': props.dealer, 'justify-start': !props.dealer }));
|
||||
const farClass = computed(() => ({ 'd-flex': true, 'justify-end': !props.dealer, 'justify-start': props.dealer }));
|
||||
|
||||
const hpText = computed(() => '⚡'.repeat(props.stats.hp) || ' ');
|
||||
</script>
|
||||
|
@@ -1,17 +0,0 @@
|
||||
<template>
|
||||
<v-sheet :elevation="2" width="100" height="30" class="text-center">
|
||||
{{ text }}
|
||||
</v-sheet>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { computed } from 'vue';
|
||||
|
||||
export interface Props {
|
||||
hp: number;
|
||||
}
|
||||
|
||||
const props = defineProps<Props>();
|
||||
|
||||
const text = computed(() => '⚡'.repeat(props.hp) || ' ');
|
||||
</script>
|
Reference in New Issue
Block a user