Components

CurrentUserNav

<CurrentUserNav />

Component rendering current user top-right menu.

Usage

import { CurrentUserNav } from '@admin-bro/design-system'

return (
  <CurrentUserNav
    name={name}
    title={title}
    avatarUrl={avatar}
    dropActions={dropActions}
    lineActions={lineActions}
  />
)

Prop types

By default all the data are passed via CurrentUserNavProps - check them out below.

Example

Full-featured example with all the props

New:
  • In version 3.3
See:

View Source admin-bro-design-system/src/organisms/current-user-nav/current-user-nav.tsx, line 15

Type Definitions

object

# CurrentUserNavAction

Action element passed to CurrentUserNavProps

Properties:
Name Type Attributes Description
label string

action label

onClick function <optional>

action OnClick handler - taking event as a param

icon string <optional>

Action icon

isActive string <optional>

indicates if action is active

href string <optional>

href for an action

View Source admin-bro-design-system/src/organisms/current-user-nav/current-user-nav-props.ts, line 3

object

# CurrentUserNavProps

Props passed to CurrentUserNav component

Properties:
Name Type Attributes Description
name string

User name

title string <optional>

User title - visible below the name

avatarUrl string <optional>

Avatar url

dropActions Array.<CurrentUserNavAction> <optional>

Array of all the actions visible on hover

lineActions Array.<CurrentUserNavAction> <optional>

Array of all the actions visible by the user name

View Source admin-bro-design-system/src/organisms/current-user-nav/current-user-nav-props.ts, line 15

SoftwareBrothers

Proudly built and maintained by SoftwareBrothers

Software House with a passion for both JavaScript and TypeScript.

See what we do See what we believe in

Proudly built and maintained by

SoftwareBrothers