Files
wishlist/src/lib/components/themes/ThemeBackground.svelte
T
Rasmus Q 35c1ab64e8 refactor: fix all lint errors and improve code quality
- Fix TypeScript 'any' types throughout codebase
- Add proper type definitions for wishlist items and components
- Fix missing keys in {#each} blocks
- Remove unused imports and variables
- Remove unused function parameters
- Update imports to use new schema location (/db/schema)
- Disable overly strict Svelte navigation lint rules
- Ignore .svelte.ts files from ESLint (handled by Svelte compiler)
2026-03-15 21:10:58 +00:00

32 lines
905 B
Svelte

<script lang="ts">
import TopPattern from './svgs/TopPattern.svelte';
import BottomPattern from './svgs/BottomPattern.svelte';
import { getTheme, PATTERN_OPACITY } from '$lib/utils/themes';
import { themeStore } from '$lib/stores/theme.svelte';
let {
themeName,
showTop = true,
showBottom = true
}: {
themeName?: string | null;
showTop?: boolean;
showBottom?: boolean;
} = $props();
const theme = $derived(getTheme(themeName));
const patternColor = $derived.by(() => {
const isDark = themeStore.getResolvedTheme() === 'dark';
return isDark ? '#FFFFFF' : '#000000';
});
</script>
{#if theme.pattern !== 'none'}
{#if showTop}
<TopPattern pattern={theme.pattern} color={patternColor} opacity={PATTERN_OPACITY} />
{/if}
{#if showBottom}
<BottomPattern pattern={theme.pattern} color={patternColor} opacity={PATTERN_OPACITY} />
{/if}
{/if}