You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
23 lines
423 B
23 lines
423 B
<script>
|
|
import pluralize from "pluralize";
|
|
|
|
import ActivityIcon from "./ActivityIcon.svelte";
|
|
|
|
export let amount = 0
|
|
export let subActivity = null
|
|
</script>
|
|
|
|
{#if subActivity != null}
|
|
<span>{amount} {pluralize(subActivity.unitName, amount)}</span>
|
|
{:else}
|
|
<span class="unknown">{amount} (unknown unit)</span>
|
|
{/if}
|
|
|
|
<style>
|
|
span {
|
|
display: inline-block;
|
|
}
|
|
span.unknown {
|
|
color: #555;
|
|
}
|
|
</style>
|