So I have Admin with all the resources that I need and it works great. But I also need one little menu item that would just open a simple form with a button.
I created Menu.js like it's described here:
https://marmelab.com/admin-on-rest//AdminResource.html#menu
And added it to my admin.
But after that I see only items that I have in that Menu, but not resources. How can I have them both: Resources and MenuItems in that menu?
Have a look at the framework's Menu.js
for inspiration.
resources
param and create <MenuItem>
s for each resource<MenuItem>
s{logout}
if you are using authenticationIe:
import React from 'react';
import MenuItem from 'material-ui/MenuItem';
import { Link } from 'react-router-dom';
export default ({ resources, onMenuTap, logout }) => (
<div>
{ resources.map(resource => {
return <MenuItem
key={resource.name}
containerElement={<Link to={`/${resource.name}`} />}
primaryText={resource.options.label}
onTouchTap={onMenuTap}
/>
})}
<MenuItem key="download" containerElement={<Link to="/download" />} primaryText="Download" onTouchTap={onMenuTap} />
{logout}
</div>
);