15 lines
541 B
Vue
15 lines
541 B
Vue
|
|
<script setup lang="ts">
|
||
|
|
import type { Cost } from '~/types/game'
|
||
|
|
|
||
|
|
defineProps<{ cargo: Cost | null }>()
|
||
|
|
</script>
|
||
|
|
|
||
|
|
<!-- What merchants carry: an icon and amount per resource, nothing for none. -->
|
||
|
|
<template>
|
||
|
|
<span class="inline-flex flex-wrap items-center gap-x-2 gap-y-0.5 tabular-nums">
|
||
|
|
<span v-for="[r, amount] in cargoRows(cargo)" :key="r" class="inline-flex items-center gap-0.5 whitespace-nowrap" :title="$t(`resources.${r}`)">
|
||
|
|
<IconResource :resource="r" class="size-3.5" />{{ amount }}
|
||
|
|
</span>
|
||
|
|
</span>
|
||
|
|
</template>
|