|
|
|
@ -1,9 +1,13 @@ |
|
|
|
<script> |
|
|
|
import { isActive, url, goto } from "@sveltech/routify" |
|
|
|
import getIcon from "../common/icon" |
|
|
|
import { backendUiStore } from "builderStore" |
|
|
|
|
|
|
|
export let name = "" |
|
|
|
export let label = "" |
|
|
|
export let href |
|
|
|
|
|
|
|
$: console.log("Active: ", $isActive(href)) |
|
|
|
|
|
|
|
$: navActive = $backendUiStore.leftNavItem === name |
|
|
|
|
|
|
|
@ -11,14 +15,15 @@ |
|
|
|
</script> |
|
|
|
|
|
|
|
<div |
|
|
|
on:click={() => $goto($url(href))} |
|
|
|
class="budibase__nav-item backend-nav-item" |
|
|
|
class:selected={navActive} |
|
|
|
on:click={setActive}> |
|
|
|
class:selected={$isActive(href)}> |
|
|
|
{label} |
|
|
|
</div> |
|
|
|
|
|
|
|
<style> |
|
|
|
.backend-nav-item { |
|
|
|
padding-left: 25px; |
|
|
|
cursor: pointer; |
|
|
|
} |
|
|
|
</style> |
|
|
|
|