update: better color support on wishlists
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
<script lang="ts">
|
||||
import CardPattern from './svgs/CardPattern.svelte';
|
||||
import { getTheme, getPatternColor, PATTERN_OPACITY } from '$lib/utils/themes';
|
||||
import { getTheme, PATTERN_OPACITY } from '$lib/utils/themes';
|
||||
import { themeStore } from '$lib/stores/theme.svelte';
|
||||
|
||||
let {
|
||||
themeName,
|
||||
@@ -11,7 +12,10 @@
|
||||
} = $props();
|
||||
|
||||
const theme = $derived(getTheme(themeName));
|
||||
const patternColor = $derived(getPatternColor(color));
|
||||
const patternColor = $derived.by(() => {
|
||||
const isDark = themeStore.getResolvedTheme() === 'dark';
|
||||
return isDark ? '#FFFFFF' : '#000000';
|
||||
});
|
||||
</script>
|
||||
|
||||
{#if theme.pattern !== 'none'}
|
||||
|
||||
Reference in New Issue
Block a user