Convert main nav to use an ActionGroup

This commit is contained in:
Keviin Åberg Kultalahti 2021-04-16 12:40:34 +02:00
parent e8376435dd
commit 1a53a3cb45
2 changed files with 12 additions and 12 deletions

View File

@ -60,6 +60,8 @@
</button> </button>
<style> <style>
span {
text-transform: capitalize;
}
</style> </style>

View File

@ -1,7 +1,7 @@
<script> <script>
import { store, automationStore } from "builderStore" import { store, automationStore } from "builderStore"
import { roles } from "stores/backend" import { roles } from "stores/backend"
import { Button } from "@budibase/bbui" import { Button, ActionGroup, ActionButton, Icon } from "@budibase/bbui"
import SettingsLink from "components/settings/Link.svelte" import SettingsLink from "components/settings/Link.svelte"
import ThemeEditorDropdown from "components/settings/ThemeEditorDropdown.svelte" import ThemeEditorDropdown from "components/settings/ThemeEditorDropdown.svelte"
import FeedbackNavLink from "components/feedback/FeedbackNavLink.svelte" import FeedbackNavLink from "components/feedback/FeedbackNavLink.svelte"
@ -60,14 +60,11 @@
</button> </button>
<!-- This gets all indexable subroutes and sticks them in the top nav. --> <!-- This gets all indexable subroutes and sticks them in the top nav. -->
<ActionGroup>
{#each $layout.children as { path, title }} {#each $layout.children as { path, title }}
<span <ActionButton quiet selected={$isActive(path)} on:click={topItemNavigate(path)}>{title}</ActionButton>
class:active={$isActive(path)}
class="topnavitem"
on:click={topItemNavigate(path)}>
{title}
</span>
{/each} {/each}
</ActionGroup>
</div> </div>
<div class="toprightnav"> <div class="toprightnav">
<ThemeEditorDropdown /> <ThemeEditorDropdown />
@ -76,6 +73,7 @@
<a <a
target="_blank" target="_blank"
href="https://github.com/Budibase/budibase/discussions"> href="https://github.com/Budibase/budibase/discussions">
<Icon />
<i class="ri-github-fill" /> <i class="ri-github-fill" />
</a> </a>
</div> </div>