design-system icon indicating copy to clipboard operation
design-system copied to clipboard

MenuItem as Link component does not support external links

Open HichamELBSI opened this issue 1 year ago • 2 comments

Bug report

Required System information

  • Npm version: 8.5.0
  • NodeJS version: 16.4.2
  • Strapi Design System version: 1.2.0
  • Browser: Chrome

Describe the bug

The MenuItem component support internal links but not externals.

Steps to reproduce the behavior

  1. Use the SimpleMenu and MenuItem components
  2. Try to add a href/isExternal props to use the MenuItem component as an external link.

HichamELBSI avatar Jul 25 '22 11:07 HichamELBSI

hey @joshuaellis Can you please assign this to me? Also, I think it's an enhancement and not a bug since this will add external link support to the current "MenuItem" component.

Tasks =>

  1. Add support for external links to "MenuItem" component.
  2. Add/Update documentation for the same in storybook
  3. Add test cases to test the working of the external link

INNOVATIVEGAMER avatar Oct 05 '22 19:10 INNOVATIVEGAMER

Hey @INNOVATIVEGAMER

Tasks sound good, I'd probably remove the ternary operator for an if statement and look for the isExternal prop to know if it should be an anchor.

joshuaellis avatar Oct 06 '22 08:10 joshuaellis