Spaces:
Running
Running
File size: 609 Bytes
88f4632 465df5b 88f4632 465df5b 88f4632 465df5b 88f4632 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
<script lang="ts">
export let item: any;
import { createEventDispatcher } from "svelte";
const dispatch = createEventDispatcher();
</script>
<button
class="group relative rounded-xl bg-slate-200 overflow-hidden shadow"
on:click={() => dispatch("open")}
>
<img
loading="lazy"
src={item.thumb}
alt={item.file}
class="w-full h-auto block"
/>
<div
class="absolute bottom-0 left-0 right-0 bg-black/50 text-white text-xs p-2 flex justify-between"
>
<span class="truncate">{item.file}</span>
{#if item.score}<span>{Math.round(item.score.levenshtein * 100)}%</span
>{/if}
</div>
</button>
|