feat: add path_geometry data
All checks were successful
Deploy to GitHub Pages / build_site (push) Successful in 2m21s
All checks were successful
Deploy to GitHub Pages / build_site (push) Successful in 2m21s
This commit is contained in:
24
packages/ui/src/lib/helpers/StoryContent.svelte
Normal file
24
packages/ui/src/lib/helpers/StoryContent.svelte
Normal file
@@ -0,0 +1,24 @@
|
||||
<script lang="ts">
|
||||
export let theme = "dark";
|
||||
|
||||
$: if (theme !== undefined) {
|
||||
const classes = document.body.classList;
|
||||
const newClassName = `theme-${theme}`;
|
||||
for (const className of classes) {
|
||||
if (className.startsWith("theme-") && className !== newClassName) {
|
||||
classes.remove(className);
|
||||
}
|
||||
}
|
||||
document.body.classList.add(newClassName);
|
||||
}
|
||||
</script>
|
||||
|
||||
<div>
|
||||
<slot />
|
||||
</div>
|
||||
|
||||
<style>
|
||||
div {
|
||||
padding: 1em;
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user