update backendNav to use routify
This commit is contained in:
parent
1e0e98ff49
commit
9360226525
|
@ -41,7 +41,10 @@
|
|||
|
||||
</div>
|
||||
{/if}
|
||||
<NavItem name="ACCESS_LEVELS" label="User Access Levels" />
|
||||
<NavItem
|
||||
name="ACCESS_LEVELS"
|
||||
label="User Access Levels"
|
||||
href="./accesslevels" />
|
||||
</div>
|
||||
|
||||
<style>
|
||||
|
|
|
@ -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>
|
||||
|
|
Loading…
Reference in New Issue