Add some state management stuff

This commit is contained in:
Jon Staab
2024-08-06 15:46:37 -07:00
parent 36a920df51
commit fb04a68168
18 changed files with 5474 additions and 5206 deletions
+10 -5
View File
@@ -1,12 +1,17 @@
<script lang="ts">
import {page} from "$app/stores"
export let href
export let active
$: active = $page.route.id?.startsWith(href)
</script>
<a {href} class="button group justify-start border-none transition-all hover:bg-base-100">
<div
class="group-hover:brightness=[1.5] flex items-center gap-3"
class:group-hover:brightness-[1.4]={active}>
<a
{href}
class="button group justify-start border-none transition-all hover:bg-base-100"
class:text-stark-content={active}
class:bg-base-100={active}>
<div class="flex items-center gap-3">
<slot />
</div>
</a>
-1
View File
@@ -1 +0,0 @@