kunkunsh-kunkun-ext-rag/src/lib/components/ThemeCustomizer.svelte
Huakun Shen 9172f92af2
init
2025-01-18 04:30:07 -05:00

21 lines
426 B
Svelte

<script lang="ts">
import { ThemeCustomizerButton, type ThemeConfig, updateTheme } from '@kksh/svelte5';
import { ui } from '@kksh/api/ui/iframe';
import { onMount } from 'svelte';
let config: ThemeConfig = {
radius: 0.5,
theme: 'zinc',
lightMode: 'auto'
};
onMount(() => {
ui.getTheme().then((theme) => {
config = theme;
});
});
$: updateTheme(config);
</script>
<ThemeCustomizerButton bind:config />