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.
40 lines
644 B
40 lines
644 B
<script lang="ts" context="module">
|
|
export interface Amount {
|
|
label: string
|
|
amount: 0
|
|
}
|
|
</script>
|
|
|
|
<script lang="ts">
|
|
export let values: Amount[];
|
|
</script>
|
|
|
|
<div class="amounts">
|
|
{#each values as value}
|
|
<div class="amount">
|
|
<span class="value">{value.amount}×</span>
|
|
<span class="label">{value.label}</span>
|
|
</div>
|
|
{/each}
|
|
</div>
|
|
|
|
<style>
|
|
div.amounts {
|
|
display: flex;
|
|
flex-direction: row;
|
|
flex-wrap: wrap;
|
|
margin-top: 0.5em;
|
|
font-size: 0.75em;
|
|
}
|
|
div.amounts:empty {
|
|
margin-top: 0;
|
|
}
|
|
|
|
div.amount {
|
|
padding-right: 1ch;
|
|
}
|
|
|
|
span.label {
|
|
color: #777;
|
|
}
|
|
</style>
|