Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement header nav "More" and "Follow Us" menu #592

Open
frano-m opened this issue Oct 7, 2022 · 3 comments
Open

Implement header nav "More" and "Follow Us" menu #592

frano-m opened this issue Oct 7, 2022 · 3 comments
Assignees

Comments

@frano-m
Copy link
Collaborator

frano-m commented Oct 7, 2022

Implement configurable header nav menu for the "More" and "Follow Us" buttons to match mocks here and here using SB (Storybook).

Approach

  • Create a new component NavLinkMenu in explorer/app/components/Layout/components/Header/components/NavLinkMenu
  • Create a corresponding NavLinkMenu styles file for style overrides.
  • Add a SB component NavLinkMenu.stories.tsx in explorer/app/components/Layout/components/Header/components/NavLinkMenu.
    • Create two stories - one for the "More" menu, and one for the "Follow Us" menu.
  • Use SB npm run storybook to style and develop the new component.
  • See explorer/app/components/CheckboxMenu/checkboxMenu.tsx for an example use of Mui Menu. See also an example of an icon menu and menu api.
    • See CheckboxMenu for an example on how to control the menu show/hide state. We will be using anchorEl to set the position of the menu.
    • Each menu item will need a click action to 1) close the menu and 2) push the new route (use NextRouter).
    • Style the Mui Menu using the styled component. Use the PaperProps variant "menu" - take a look in theme.ts -> MuiPaper -> styleOverrides -> menu for the css specification. Override any theme styles as required (e.g. border colour).
    • For the moment, use an un-styled <button> HTML element to control the show/hide of the menu.
  • Create a new exported MenuItem interface, comprising of the following:
    • icon - ReactNode, optional.
    • label - string, required.
    • url - string, required.
  • Props
    • menuItems - MenuItem[], required.
    • menuLabel - string, required.
  • To create the icon prop in SB for the "Follow Us" menu, see explorer/app/components/common/Socials/socials.tsx, CustomIcon to generate social icons.

Definition of Done

  • Nav menu component exists in SB only.
  • Nav menu component matches mocks here and here.
@NoopDog
Copy link
Member

NoopDog commented Oct 12, 2022

HI @Arctenik, do you have enough information to start on this? Thanks, D

Arctenik added a commit that referenced this issue Nov 1, 2022
frano-m pushed a commit that referenced this issue Nov 3, 2022
* Add `NavLinkMenu` component (#592)

* Fix `NavLinkMenu` props and move icon color to theme (#592)

* Increase selector specificity and remove `!important` (#592)
@NoopDog NoopDog assigned hunterckx and unassigned Arctenik Dec 7, 2022
@hunterckx
Copy link
Collaborator

@frano-m Is my part of this finished?

@NoopDog NoopDog assigned frano-m and unassigned hunterckx Dec 9, 2022
@frano-m
Copy link
Collaborator Author

frano-m commented Dec 19, 2022

@hunterckx yes thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants