Package Exports
- @bscop/react-menu
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@bscop/react-menu) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
react-menu
Accessible menu (in React).
Install
npm i @bscop/react-menu
Usage
import Menu from "@bscop/react-menu";
function App () {
return (
<Menu
items={
[
[
{
href: "#account",
id: "account",
label: "Account",
},
{
href: "#preferences",
id: "preferences",
label: "Preferences",
},
{
href: "#billing",
id: "billing",
label: "Billing",
},
],
[
{
id: "logout",
label: "Logout",
renderItem (baseProps) {
return (
<form action="/logout" method="post">
<button {...baseProps} type="submit">
Logout
</button>
</form>
);
},
},
],
]
}
label="Menu"
/>
);
}
Contribute
Read the guidelines.
Run tests
npm test
Coverage
Coverage reports are hosted on codecov.
npm run badge:coverage -- --token=<guid>
Bruno Scopelliti
www.brunoscopelliti.com