inline player hp component

This commit is contained in:
2024-02-04 08:47:21 -06:00
parent b1bba55a7b
commit 72b0cd1023
3 changed files with 5 additions and 20 deletions

View File

@@ -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>

View File

@@ -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>