-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add
OnyxNavBar
component (#1070)
Relates to #867 - Add basic navigation bar component without mobile behaviour - add navigation bar to alpha test app Note on the "2xs" screenshots: For now we accept the "broken" visuals until we implement the mobile behaviour of the nav bar in #1073
- Loading branch information
1 parent
7c6075b
commit 9eb7b4e
Showing
66 changed files
with
1,096 additions
and
705 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
--- | ||
"sit-onyx": minor | ||
--- | ||
|
||
feat: add `OnyxNavBar` component | ||
|
||
If you used one of the `onyx-grid-max-md`, `onyx-grid-max-lg` or `onyx-grid-center` CSS classes which are not placed on the application root, move them to the application root element. See [grid docs](https://onyx.schwarz/development/grid.html#example) for further information |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
--- | ||
"sit-onyx": major | ||
--- | ||
|
||
rename SCSS breakpoint mixin | ||
|
||
Old: | ||
|
||
```scss | ||
@use "sit-onyx/breakpoints.scss" as onyx; | ||
|
||
@include onyx.breakpoint(max, md) { | ||
// your styles | ||
} | ||
``` | ||
|
||
New: | ||
|
||
```scss | ||
@use "sit-onyx/breakpoints.scss"; | ||
|
||
@include breakpoints.screen(max, md) { | ||
// your styles | ||
} | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,60 @@ | ||
<script setup lang="ts"> | ||
import { RouterView } from "vue-router"; | ||
import logout from "@sit-onyx/icons/logout.svg?raw"; | ||
import settings from "@sit-onyx/icons/settings.svg?raw"; | ||
import { | ||
OnyxAppLayout, | ||
OnyxNavBar, | ||
OnyxNavItem, | ||
OnyxUserMenu, | ||
type ListboxOption, | ||
type OnyxNavItemProps, | ||
} from "sit-onyx"; | ||
import { RouterView, useRouter } from "vue-router"; | ||
import onyxLogo from "./assets/onyx-logo.svg"; | ||
const router = useRouter(); | ||
const navItems = [ | ||
{ label: "Home", href: "/" }, | ||
{ label: "Form Demo", href: "/form-demo" }, | ||
{ label: "Layout Demo", href: "/layout-demo" }, | ||
] satisfies OnyxNavItemProps[]; | ||
const userMenuOptions = [ | ||
{ value: "/settings", label: "Settings", icon: settings }, | ||
{ value: "logout", label: "Logout", icon: logout, color: "danger" }, | ||
] satisfies ListboxOption[]; | ||
</script> | ||
|
||
<template> | ||
<RouterView /> | ||
<OnyxAppLayout> | ||
<template #navBar> | ||
<OnyxNavBar | ||
app-name="Alpha Test App" | ||
:logo-url="onyxLogo" | ||
show-back-button | ||
@back-button-click="router.back" | ||
@app-area-click="router.push('/')" | ||
> | ||
<OnyxNavItem | ||
v-for="item in navItems" | ||
:key="item.href" | ||
v-bind="item" | ||
:active="item.href === router.currentRoute.value.path" | ||
@click="router.push" | ||
/> | ||
|
||
<template #contextArea> | ||
<OnyxUserMenu username="John Doe" :options="userMenuOptions"> | ||
<template #footer> | ||
App Version | ||
<span class="onyx-text--monospace">0.0.0</span> | ||
</template> | ||
</OnyxUserMenu> | ||
</template> | ||
</OnyxNavBar> | ||
</template> | ||
|
||
<RouterView /> | ||
</OnyxAppLayout> | ||
</template> |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.