iTwin / iTwinUI-react

A react component library for iTwinUI.
https://github.com/iTwin/iTwinUI
Other
83 stars 23 forks source link

Menu: non-selectable menu item #349

Closed bentleyvk closed 2 years ago

bentleyvk commented 2 years ago

Add non-selectable menu item component as we already have CSS for it https://github.com/iTwin/iTwinUI/pull/312 Would be great to improve Header story with it: image

mayank99 commented 2 years ago

Would it make sense if we just add the iui-menu-content class when role is set to "presentation"? I think that would simplify the API.

Edit: I tried it and I think it might be better to just create a new component (called MenuContent or something). The DOM structure is slightly different (notice the missing span.iui-content) and the class name is not a modifier (notice the missing iui-menu-item class in the first item). image

bentleyvk commented 2 years ago

Yeah, I was also thinking that it should be a separate component.