add classes to scalable numbers

apply "scalable" to all
apply "scaled-up" when ingredient factor is >1
apply "unscaled" when ingredient factor is 1
apply "scaled-down" when factor is <1
This commit is contained in:
tomtjes 2024-02-07 16:51:19 -05:00
parent e5303967df
commit 14c2be9277

View File

@ -1,6 +1,5 @@
<template>
<span v-html="calculateAmount(number)"></span>
<span class="scalable" :class="[this.factor===1 ? 'unscaled' : (this.factor > 1 ? 'scaled-up':'scaled-down')]" v-html="calculateAmount(number)"></span>
</template>
<script>