<script>
import { MaterialApp, AppBar, Divider, Button } from "svelte-materialify";
let theme = 'light';
function toggleTheme() {
if (theme === 'light') theme = 'dark';
else theme = 'light';
}
</script>
<MaterialApp {theme}>
<AppBar>
<span slot="title">Title</span>
</AppBar>
<br />
<h2 class="mb-4">
Svelte Materialify
</h2>
<Divider />
<br>
<div class="text-center">
<a href="//github.com/TheComputerM/svelte-materialify/stargazers">
<Button class="primary-color">
Star on GitHub
</Button>
</a>
<Button on:click={toggleTheme}>Toggle Theme</Button>
</div>
<br />
</MaterialApp>