HeaderMenuItem uses isCurrentPage
to trigger the "selected" state for the component, whereas in SideNavMenuItem
the prop isActive
is used. This is sort of confusing to have different named props doing functionally similar things, all within the UIShell.
Updating this component to use the same prop would be a nice unification of the component APIs.
- [ ] Add `isActive` to HeaderMenuItem
- [ ] Infer it's value based on `isCurrentPage` (if provided)
- [ ] Deprecate `isCurrentPage`
- [ ] Remove `isCurrentPage` in v12
https://ibm-studios.slack.com/archives/C2K6RFJ1G/p1679052333819769
I took a look at the code and found out that the HeaderMenu
component also uses the isCurrentPage
to trigger the 'selected' state. I was wondering, shall I update this prop as well?
@pratikkarad yes, we should mirror these changes in both HeaderMenu
and HeaderMenuItem
. They can be bundled in the open PR