19 lines
424 B
Vue
19 lines
424 B
Vue
<script setup lang="ts">
|
|
import { computed } from 'vue'
|
|
|
|
const props = defineProps<{ value: number; min: number; max: number }>()
|
|
|
|
const outside = computed(
|
|
() => props.value > 0 && (props.value < props.min || props.value > props.max),
|
|
)
|
|
</script>
|
|
|
|
<template>
|
|
<span
|
|
class="font-mono text-xs"
|
|
:class="outside ? 'text-warning' : 'text-muted'"
|
|
data-testid="soft-counter"
|
|
>{{ value }} / {{ max }}</span
|
|
>
|
|
</template>
|