svelte-theme-provider
v0.1.11
Published
Svelte implementation of dooboo-ui/theme
Downloads
2
Readme
Svelte-theme-provider
Svelte implementation of theme package in dooboo-ui.
<script>
import { ThemeProvider } from 'svelte-theme-provider';
</script>
<ThemeProvider themeType={themeType}>
<Test/>
</ThemeProvider>
<script>
import { getContext } from 'svelte';
const { Theme, toggle } = getContext('theme');
let theme;
let themeType;
Theme.subscribe((value) => { theme = value.theme; themeType = value.themeType; });
</script>