1.0.0 • Published 4 years ago
svelte-dark-theme-manager v1.0.0
Simple and useless, isn't is?
<script>
import { theme } from 'svelte-dark-theme-manager';
</script>
<div id="app" class:dark={$theme}>
Is dark theme: {$theme}
<button on:click={() => { theme.set(!$theme) }}>
Change theme
</button>
</div>
<style>
#app{
height: 100vh;
width: 100%;
padding: 16px;
}
:global(body){
padding: 0;
}
:global(*){
box-sizing: border-box;
}
#app.dark{
background: #333;
color: #eee;
}
</style>