Skip to content

Commit

Permalink
makeStyles outside component
Browse files Browse the repository at this point in the history
  • Loading branch information
jcardus committed Nov 14, 2024
1 parent 613e7ec commit 21e598e
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/common/components/MenuItem.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@ import { ListItemButton, ListItemIcon, ListItemText } from '@mui/material';
import { Link } from 'react-router-dom';
import React from 'react';

const MenuItem = ({
title, link, icon, selected,
}) => {
const classes = makeStyles({
menuItemText: {
whiteSpace: 'nowrap',
},
});
const useStyles = makeStyles(() => ({
menuItemText: {
whiteSpace: 'nowrap',
},
}));

const MenuItem = ({ title, link, icon, selected }) => {
const classes = useStyles();
return (
<ListItemButton key={link} component={Link} to={link} selected={selected}>
<ListItemIcon>{icon}</ListItemIcon>
Expand Down

0 comments on commit 21e598e

Please sign in to comment.