aboutsummaryrefslogtreecommitdiff
path: root/src/lib/components/BestRef.svelte
blob: baa04f83abb6d0a4b5acfe690a142269f5a010a4 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24

<script lang="ts">
	import type { Reference } from '$lib/server/services/types';

	let { ref }: { ref: Reference } = $props();
</script>

<span class="best-ref">
	{ref.reference}
	{#if ref.price && ref.unit}
		&nbsp;{ref.price.toFixed(2)}
		{ref.unit}
	{/if}
	{#if ref.qualityScore != null}
		&nbsp;({ref.qualityScore}/100)
	{/if}
</span>

<style>
	.best-ref {
		font-size: 0.75rem;
		color: var(--text-secondary);
		font-weight: 400;
	}
</style>