no color in transfers
This commit is contained in:
+14
-2
@@ -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>
|
||||
@@ -66,7 +66,7 @@ const sortedArray = computedAsync(async () => {
|
||||
</template>
|
||||
<template v-else-if="t.type === TransferTypes.Isk">
|
||||
<td colspan="2" class="text-right">
|
||||
<IskLabel :amount="t.amount" />
|
||||
<IskLabel :amount="t.amount" :colored="false" />
|
||||
</td>
|
||||
</template>
|
||||
</tr>
|
||||
|
||||
Reference in New Issue
Block a user