Add database cell components for icons and images

This commit is contained in:
Justin Edmund 2025-09-17 06:43:03 -07:00
parent d262eba8b2
commit 30ab61fbc9
5 changed files with 58 additions and 4 deletions

View file

@ -26,10 +26,10 @@
.database-image {
max-width: 100%;
max-height: 40px;
max-height: 60px;
width: auto;
height: auto;
object-fit: contain;
border-radius: 4px;
}
</style>
</style>

View file

@ -0,0 +1,27 @@
<svelte:options runes={true} />
<script lang="ts">
import type { IRow } from 'wx-svelte-grid'
import ElementLabel from '$lib/components/labels/ElementLabel.svelte'
interface Props {
row: IRow
}
const { row }: Props = $props()
const element = $derived(row.element)
</script>
<div class="element-cell">
<ElementLabel {element} size="small" />
</div>
<style lang="scss">
.element-cell {
display: flex;
align-items: center;
justify-content: center;
height: 100%;
}
</style>

View file

@ -0,0 +1,27 @@
<svelte:options runes={true} />
<script lang="ts">
import type { IRow } from 'wx-svelte-grid'
import ProficiencyLabel from '$lib/components/labels/ProficiencyLabel.svelte'
interface Props {
row: IRow
}
const { row }: Props = $props()
const proficiency = $derived(row.proficiency)
</script>
<div class="proficiency-cell">
<ProficiencyLabel {proficiency} size="large" />
</div>
<style lang="scss">
.proficiency-cell {
display: flex;
align-items: center;
justify-content: center;
height: 100%;
}
</style>

View file

@ -26,7 +26,7 @@
.database-image {
max-width: 100%;
max-height: 40px;
max-height: 60px;
width: auto;
height: auto;
object-fit: contain;

View file

@ -26,7 +26,7 @@
.database-image {
max-width: 100%;
max-height: 40px;
max-height: 60px;
width: auto;
height: auto;
object-fit: contain;