desktop app menus with react
npm install react-desktop-menusshell
npm install react-desktop-menus
`$3
`javascript
import React from "react"
import { render } from "react-dom"
import { Menu, MenuItem, Divider } from "react-desktop-menus"const action = () => console.log("hello")
render(
,
document.getElementById("content")
)
`Constructors
$3
#### Usage
`javascript
import { Menu } from "react-desktop-menus"ReactDOM.render(
, document.getElementById("content"))
`
or (to load only what you need)
`javascript
import Menu from "react-desktop-menus/lib/Menu"ReactDOM.render(
, document.getElementById("content"))
`#### Properties
- keyboard (boolean) : use keyboard to select and/or execute an item action,
- display (boolean) : display or not the menu,
- style (object) : overriders style menu,
- itemHoverColor (object) : background color when an item is active,
- label (string) : label to display for a menubar
$3
#### Usage
`javascript
import { Menu, MenuItem } from "react-desktop-menus"ReactDOM.render(
,
document.getElementById("content")
)
`
or (to load only what you need)
`javascript
import Menu from "react-desktop-menus/lib/Menu"
import MenuItem from "react-desktop-menus/lib/MenuItem"
``#### Properties
- icon (node) : component for icon,
- info (string) : info displayed on right (like a global shortcut)
- label (string)
- disabled (boolean)
- action (function) : action to execute on click (or enter if keyboard is enabled)
- checkbox (boolean) : replace icon with a checkbox
- defaultChecked (boolean)
- shortcut (string) : shortcut letter (it will be underlined in label displayed) to access this item
- activeColor (string) : background color when item is active
- style (object) : overrides item style