design-system
design-system copied to clipboard
MenuItem as Link component does not support external links
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
- Use the SimpleMenu and MenuItem components
- Try to add a href/isExternal props to use the MenuItem component as an external link.
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 =>
- Add support for external links to "MenuItem" component.
- Add/Update documentation for the same in storybook
- Add test cases to test the working of the external link
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.