New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@rmwc/menu

Package Overview
Dependencies
Maintainers
1
Versions
176
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@rmwc/menu - npm Package Compare versions

Comparing version 8.0.5 to 8.0.6

9

dist/readme.js

@@ -49,2 +49,11 @@ "use strict";

}),
react_1.default.createElement(_doc_utils_1.DocsExample, null, function Example() {
var _a = tslib_1.__read(react_1.default.useState(false), 2), open = _a[0], setOpen = _a[1];
return (react_1.default.createElement(_1.MenuSurfaceAnchor, null,
react_1.default.createElement(_1.Menu, { open: open, onSelect: function (evt) { return console.log(evt.detail.index); }, onClose: function (evt) { return setOpen(false); } },
react_1.default.createElement(_1.MenuItem, null, "Item One"),
react_1.default.createElement(_1.MenuItem, { disabled: true }, "Item Two (disabled)"),
react_1.default.createElement(_1.MenuItem, null, "Item Three")),
react_1.default.createElement(button_1.Button, { raised: true, onClick: function () { return setOpen(!open); } }, "Menu")));
}),
react_1.default.createElement(_doc_utils_1.DocsSubtitle, null, "Simplified usage"),

@@ -51,0 +60,0 @@ react_1.default.createElement(_doc_utils_1.DocsP, null, "RMWC provides a convenience `SimpleMenu` component that takes a handle as a prop, and manages the open state for you."),

@@ -46,2 +46,11 @@ import { __read } from "tslib";

}),
React.createElement(DocsExample, null, function Example() {
var _a = __read(React.useState(false), 2), open = _a[0], setOpen = _a[1];
return (React.createElement(MenuSurfaceAnchor, null,
React.createElement(Menu, { open: open, onSelect: function (evt) { return console.log(evt.detail.index); }, onClose: function (evt) { return setOpen(false); } },
React.createElement(MenuItem, null, "Item One"),
React.createElement(MenuItem, { disabled: true }, "Item Two (disabled)"),
React.createElement(MenuItem, null, "Item Three")),
React.createElement(Button, { raised: true, onClick: function () { return setOpen(!open); } }, "Menu")));
}),
React.createElement(DocsSubtitle, null, "Simplified usage"),

@@ -48,0 +57,0 @@ React.createElement(DocsP, null, "RMWC provides a convenience `SimpleMenu` component that takes a handle as a prop, and manages the open state for you."),

8

package.json
{
"name": "@rmwc/menu",
"version": "8.0.5",
"version": "8.0.6",
"description": "RMWC Menu component",

@@ -41,7 +41,7 @@ "main": "dist/index.js",

"@material/menu-surface": "^8.0.0",
"@rmwc/base": "^8.0.5",
"@rmwc/list": "^8.0.5",
"@rmwc/types": "^8.0.5"
"@rmwc/base": "^8.0.6",
"@rmwc/list": "^8.0.6",
"@rmwc/types": "^8.0.6"
},
"gitHead": "d9befec0e3b258864b71686eecd16c16feb43cf1"
}

@@ -83,2 +83,26 @@ # Menus

```jsx
function Example() {
const [open, setOpen] = React.useState(false);
return (
<MenuSurfaceAnchor>
<Menu
open={open}
onSelect={(evt) => console.log(evt.detail.index)}
onClose={(evt) => setOpen(false)}
>
<MenuItem>Item One</MenuItem>
<MenuItem disabled>Item Two (disabled)</MenuItem>
<MenuItem>Item Three</MenuItem>
</Menu>
<Button raised onClick={() => setOpen(!open)}>
Menu
</Button>
</MenuSurfaceAnchor>
);
}
```
## Simplified usage

@@ -85,0 +109,0 @@

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc