Open MajaZarkova opened 2 months ago
As discussed, this would be our prefered API for the nav bar:
<template>
<OnyxNavBar>
<OnyxNavButton>
Item 1
<OnyxBadge dot />
</OnyxNavButton>
<OnyxNavButton>
Item 2
<template #children>
<OnyxNavItem> I am child 1 </OnyxNavItem>
<OnyxNavItem> I am child 2 </OnyxNavItem>
<OnyxNavItem> I am child 3 </OnyxNavItem>
</template>
</OnyxNavButton>
<OnyxUserMenu>
<OnyxListItem @click="handleLogout">
<OnyxIcon />
Logout
</OnyxListItem>
<OnyxListItem @click="router.push('/settings')"> Settings </OnyxListItem>
</OnyxUserMenu>
</OnyxNavBar>
</template>
Open Questions/To-dos
Why?
This component is needed and will be used inside the NavMenuItem. This is just a support component. It's responsible for handling keyboard navigation, rendering and opening of the flyout.
Design
Figma Link (Context Area section)
Acceptance criteria
Definition of Done
In Approval
Approval
Reference implementations
CoreUI Reference
ARIA
https://www.w3.org/WAI/ARIA/apg/patterns/menubar/examples/menubar-navigation/ https://www.w3.org/WAI/ARIA/apg/patterns/menu-button/ https://www.w3.org/WAI/ARIA/apg/patterns/disclosure/examples/disclosure-navigation/ https://www.w3.org/WAI/ARIA/apg/patterns/menubar/