Can MenuItem be extended to take an icon prop?
See original GitHub issueI’m currently having to compose the UI myself. It works, but it’s a little bit clunky.
Here’s a sandbox: https://codesandbox.io/s/chakra-js-starter-z0400
I’m thinking it’d be nice to reuse Button
’s leftIcon
and rightIcon
prop names for this.
I think this idea could be used for the new Select component too (#38)
Issue Analytics
- State:
- Created 4 years ago
- Comments:8 (6 by maintainers)
Top Results From Across the Web
MenuItem.Icon Property (System.Windows.Controls)
Gets or sets the icon that appears in a MenuItem. ... MenuItem.Icon Property ... Many Menu controls have more than just text in...
Read more >Menu Item is not expanding default after applying property ...
I am working on diamond-react theme of primereact and I have customized the menu. I want to expand the menu item default or...
Read more >MenuItem API - Material UI - MUI
Name Type Default
autoFocus bool false
children node
classes object
Read more >MenuItem - Mineral UI
A MenuItem can display an Icon at its start, end, or both. If both startIcon and variant props are provided, startIcon will be...
Read more >Menu - Chakra UI
You can add icon to each MenuItem by passing the icon prop. To add a commands (or hotkeys) to menu items, you can...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I see what you mean.
Allowing users to compose the content of
MenuItem
was intentional but I understand that having theicon
prop will save some time.I’ll consider adding that to the
MenuItem
component.@aaronmcadam. I intend to add a
MenuItemIcon
component in thedev-ts
branch