@fenderdigital/react-menu

Fender React UI Kit Menu Component

Usage no npm install needed!

<script type="module">
  import fenderdigitalReactMenu from 'https://cdn.skypack.dev/@fenderdigital/react-menu';
</script>

README

Menu for Fender React UI Kit

Description

Renders a navigation menu with submenu links, and accordion functionality for mobile devices.

Installation and Usage

yarn add @fenderdigital/react-menu --save
import Menu from '@fenderdigital/react-menu';

Props

  • dataId - An id for unit and e2s testing.
  • firstName - A name for an authenticated a user.
  • isHoverable - Enables the menu to be expand/collapse its with onHover.
  • onClick - A callback that passes type, label and url values. Useful for tracking.
  • offsetTop - Provides a way to offset the top position to account for an app bar header.
  • pathname - Provides a way for the menu to know what route it's currently on.
  • primary - A primary set of a navigation items. Needed for layout purposes.
  • profileUrl - A url link to the user's profile.
  • signOutUrl - The signout url for connect.
  • secondary - A secondary set of navigation items. Needed for layout purposes.
propName propType defaultValue isRequired
dataId string 'menu' no
firstName string - yes
onClick funct - yes
pathname string '/path' no
primary array - yes
profileUrl string - yes
secondary array - yes
signOutUrl string - yes

Development

Check the Monorepo README for development documentation.