@nouzbe/rc-menu
v9.3.4
Published
menu ui component for react
Downloads
4
Maintainers
Readme
@activeviam/rc-menu
This is a fork from rc-menu.
The reason why this fork exists is to avoid the API change from React children to items
, brought by commit/adbfd23. Indeed, this API change either implies to degrade the API of ActiveUI regarding menu item plugins and application menus or to degrade de UI.
See related discussion.
React Menu Component. port from https://github.com/kissyteam/menu
Install
Usage
import Menu, { SubMenu, MenuItem } from 'rc-menu';
ReactDOM.render(
<Menu>
<MenuItem>1</MenuItem>
<SubMenu title="2">
<MenuItem>2-1</MenuItem>
</SubMenu>
</Menu>,
container,
);
Compatibility
| IE / Edge | Firefox | Chrome | Safari | Electron | | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | IE11, Edge | last 2 versions | last 2 versions | last 2 versions | last 2 versions |
API
Menu props
Menu.Item props
Menu.SubMenu props
Menu.Divider props
none
Menu.ItemGroup props
Development
npm install
npm start
Example
http://localhost:8001/examples/index.md
online example: http://react-component.github.io/menu/examples/
Test Case
npm test
npm run chrome-test
Coverage
npm run coverage
open coverage/ dir
License
rc-menu is released under the MIT license.