Skip to content

Commit 07e7ed2

Browse files
authored
Remove irrelevant paragraph
1 parent 63c2d5f commit 07e7ed2

File tree

1 file changed

+0
-43
lines changed

1 file changed

+0
-43
lines changed

docs/Theming.md

-43
Original file line numberDiff line numberDiff line change
@@ -890,49 +890,6 @@ const App = () => (
890890

891891
The `MenuItemLink` component make use of the React Router [NavLink](https://reacttraining.com/react-router/web/api/NavLink) component, hence allowing to customize its style when it targets the current page.
892892

893-
If the default active style does not suit your tastes, you can override it by passing your own `classes`: // the code below doesn't use the `classes` prop
894-
895-
```jsx
896-
// in src/Menu.js
897-
import * as React from 'react';
898-
import { createElement } from 'react';
899-
import { useSelector } from 'react-redux';
900-
import { useMediaQuery } from '@material-ui/core';
901-
import { MenuItemLink, getResources } from 'react-admin';
902-
import { withRouter } from 'react-router-dom';
903-
import LabelIcon from '@material-ui/icons/Label';
904-
905-
const Menu = ({ onMenuClick, logout }) => {
906-
const isXSmall = useMediaQuery(theme => theme.breakpoints.down('xs'));
907-
const open = useSelector(state => state.admin.ui.sidebarOpen);
908-
const resources = useSelector(getResources);
909-
return (
910-
<div>
911-
{resources.map(resource => (
912-
<MenuItemLink
913-
key={resource.name}
914-
to={`/${resource.name}`}
915-
primaryText={resource.options && resource.options.label || resource.name}
916-
leftIcon={createElement(resource.icon)}
917-
onClick={onMenuClick}
918-
sidebarIsOpen={open}
919-
/>
920-
))}
921-
<MenuItemLink
922-
to="/custom-route"
923-
primaryText="Miscellaneous"
924-
leftIcon={LabelIcon}
925-
onClick={onMenuClick}
926-
sidebarIsOpen={open}
927-
/>
928-
{isXSmall && logout}
929-
</div>
930-
);
931-
};
932-
933-
export default withRouter(Menu);
934-
```
935-
936893
**Tip**: If you need a multi-level menu, or a Mega Menu opening panels with custom content, check out [the `ra-navigation`<img class="icon" src="./img/premium.svg" /> module](https://marmelab.com/ra-enterprise/modules/ra-navigation) (part of the [Enterprise Edition](https://marmelab.com/ra-enterprise))
937894

938895
![MegaMenu and Breadcrumb](https://marmelab.com/ra-enterprise/modules/assets/ra-multilevelmenu-categories.gif)

0 commit comments

Comments
 (0)