Manta Developers
GitHub
Menu

@manta-eu/react/providers/NavExtrasProvider

Reference for @manta-eu/react/providers/NavExtrasProvider as it is on main.

Type Aliases

NavExtra = object

A sidebar entry the host adds, for a feature the design system knows nothing about.

The nav is one list in Sidebar, and a host that mounts something of its own — manta/agents mounts Horns — would otherwise have to fork that list or thread a prop through every RouteLayout call site.

Properties

href

href: string

icon

icon: LucideIcon

id?

optional id?: string

isCurrent?

optional isCurrent?: (pathname) => boolean

Whether this entry is the page being looked at. Defaults to its href and anything under it.

Parameters
pathname

string

Returns

boolean

title

title: string


NavExtrasProviderProps = object

Properties

children

children: ReactNode

items?

optional items?: readonly NavExtra[]

Functions

NavExtrasProvider(props): Element

Parameters

props

NavExtrasProviderProps

Returns

Element


useNavExtras()

useNavExtras(): readonly NavExtra[]

Returns

readonly NavExtra[]