
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
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 |
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 |