Module

UserMenu

Methods

# inner MenuArrow(props) → {React.ReactElement}

Renders and arrow to the right of the menu to indicate if it is open or closed
Parameters:
Name Type Description
props object
open boolean boolean to indicate if the menu is open

View Source stories/UserMenu.jsx, line 10

- the menu arrow
React.ReactElement

# inner UserMenu(props) → {React.ReactElement}

A user menu component that displays the user name and a menu of links if provided
Parameters:
Name Type Attributes Description
props object
user object <optional>
the user object
user.name string <optional>
the name of the user
user.isSignedIn boolean <optional>
boolean to indicate if the user is signed in
onLogin function <optional>
the onLogin handler
onLogout function <optional>
the onLogout handler
links Array.<object> <optional>
an array of links to display in the menu
links[].title string <optional>
the title of the link
links[].href string <optional>
the href of the link
hideArrow boolean <optional>
boolean to indicate if the arrow should be hidden

View Source stories/UserMenu.jsx, line 28

- the user menu
React.ReactElement