no color in transfers

This commit is contained in:
Sirttas
2026-06-04 19:51:04 +02:00
parent 57b9ec17de
commit 46a2538bef
2 changed files with 15 additions and 3 deletions
+14 -2
View File
@@ -1,13 +1,25 @@
<script setup lang="ts">
import {formatIsk} from "@/formaters";
import {computed} from "vue";
interface Props {
amount: number;
colored?: boolean;
}
const { amount } = defineProps<Props>();
const props = withDefaults(defineProps<Props>(), {
colored: true,
});
const computedClass = computed(() => {
if (!props.colored) {
return "";
}
return props.amount >= 0 ? 'text-emerald-400' : 'text-amber-700';
})
</script>
<template>
<span :class="amount >= 0 ? 'text-emerald-400' : 'text-amber-700'">{{ formatIsk(amount) }}</span>
<span :class="computedClass">{{ formatIsk(amount) }}</span>
</template>