svelte-theme-provider
TypeScript icon, indicating that this package has built-in type declarations

0.1.11 • Public • Published

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>

Readme

Keywords

Package Sidebar

Install

npm i svelte-theme-provider

Weekly Downloads

2

Version

0.1.11

License

MIT

Unpacked Size

13.3 kB

Total Files

14

Last publish

Collaborators

  • yujonglee