34 lines
648 B
Svelte
34 lines
648 B
Svelte
<script lang="ts">
|
|
import type Item from "../models/item";
|
|
import Icon from "./Icon.svelte";
|
|
|
|
export let item: Item = null;
|
|
</script>
|
|
|
|
<div class="item">
|
|
<div class="item-icon">
|
|
<Icon name={item.icon} />
|
|
</div>
|
|
<div class="item-name">
|
|
<a href="/items#{item.groupId}">{item.name} ({item.groupWeight})</a>
|
|
</div>
|
|
</div>
|
|
|
|
<style>
|
|
div.item {
|
|
display: flex;
|
|
flex-direction: row;
|
|
margin-top: 0.25em;
|
|
margin-bottom: 0em;
|
|
font-size: 0.75em;
|
|
}
|
|
div.item a {
|
|
color: inherit;
|
|
}
|
|
div.item div.item-icon {
|
|
padding: 0.25em 0.5ch 0.25em 0;
|
|
}
|
|
div.item div.item-name {
|
|
padding: 0.125em;
|
|
}
|
|
</style> |