Refactoring: move 'GetDefaultIcon' into its own Svelte-class

This commit is contained in:
Pieter Vander Vennet 2025-01-02 03:56:42 +01:00
parent f6ed163554
commit 28f9532af9
13 changed files with 97 additions and 80 deletions

View file

@ -8,6 +8,7 @@
import { Translation } from "../i18n/Translation"
import { XMarkIcon } from "@babeard/svelte-heroicons/mini"
import ToSvelte from "../Base/ToSvelte.svelte"
import DefaultIcon from "../Map/DefaultIcon.svelte"
export let layer: LayerConfig
export let state: ThemeViewState
@ -28,7 +29,7 @@
<div class="low-interaction p-2">
<h4 class="my-2 flex">
<div class="no-image-background block h-6 w-6">
<ToSvelte construct={() => layer.defaultIcon()} />
<DefaultIcon {layer}/>
</div>
<Tr t={layer.name} />
</h4>