No way to override style of a floating <OverflowMenu>in v9
See original GitHub issueSummary
I would open this issue against [https://github.com/carbon-design-system/carbon-components-react] but apparently this is the new place…
In Carbon V9 (specifically, carbon-components-react@6
) it is not possible to override the styling of an <OverflowMenu floatingMenu />
to e.g. make it wider. Specifically, the options themselves. As with nearly all Carbon components it is possible to pass a className
prop into the component, which can then be targeted to alter rendering. Unfortunately, when the menu options are floating, they appear at a completely different location in the DOM from where the injected className
goes. So all we can do is alter the rendering of the menu icon.
Justification
This would be useful for making the floating menu bigger, so that longer menu options are easier to read.
Desired UX and success metrics
Something like: when a <OverflowMenu floatingMenu optionsClassName='x' />
is opened, the <ul>
which gets appended to the DOM should have class='x'
on it.
“Must have” functionality
That’s about it!
Specific timeline issues / requests
Soon as you like, really. This is a simple request so if this isn’t likely to appear in the next week I may be able to put together a PR myself.
Available extra resources
I’ll try to patch this myself if I have to…
Issue Analytics
- State:
- Created 4 years ago
- Comments:14 (12 by maintainers)
Top GitHub Comments
@asudoh: raised #2907.
As there’s been no activity since this issue was marked as stale, we are auto-closing it.