aboutsummaryrefslogtreecommitdiff
path: root/src/components/CardThumb.svelte
blob: f733b328b2820ad729433fe133cfb6818de10746 (plain)
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
26
27
28
29
30
31
32
33
<script lang="ts">

import {setLeftPanelCard} from '../control/left_panel.svelte.js';

let {id} = $props();

function onhover() {
    setLeftPanelCard(id); 
}

</script>

{#if id}
    <img
        onmouseover={onhover}
        onfocus={onhover}
        height="100%"
        src="https://cdn.233.momobako.com/ygopro/pics/{id}.jpg!half"
        alt="yugioh card {id}"
    />
{/if}

<style>

.card-thumbnail {
    width: 50px;
    height: 70px;
    background-color: #eee;
    margin-right: 10px;
    border-radius: 3px;
}

</style>