Skip to content

Commit

Permalink
align mui5 styled / sx naming
Browse files Browse the repository at this point in the history
  • Loading branch information
Wilhelm Herbrich committed Sep 18, 2023
1 parent c763673 commit fb9634c
Showing 1 changed file with 10 additions and 13 deletions.
23 changes: 10 additions & 13 deletions src/components/WorkspaceOptionsButton.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,9 @@ import MoreHorizontalIcon from '@mui/icons-material/MoreHorizSharp';
import MiradorMenuButton from '../containers/MiradorMenuButton';
import WorkspaceOptionsMenu from '../containers/WorkspaceOptionsMenu';

const StyledMiradorMenuButton = styled(MiradorMenuButton)(({ open, theme }) => {
const css = {
margin: theme.spacing(1),
};
if (open) {
css.backgroundColor = theme.palette.action.selected;
}
return css;
});
const StyledButton = styled(MiradorMenuButton)(({ theme }) => ({
margin: theme.spacing(1),
}));

/**
* WorkspaceOptionsButton ~
Expand Down Expand Up @@ -61,14 +55,17 @@ export class WorkspaceOptionsButton extends Component {

return (
<>
<StyledMiradorMenuButton
<StyledButton
aria-label={t('workspaceOptions')}
open={open}
onClick={this.handleMenuClick}
sx={{
...(open && {
backgroundColor: 'action.selected',
}),
}}
>
<MoreHorizontalIcon />
</StyledMiradorMenuButton>

</StyledButton>
<WorkspaceOptionsMenu
anchorEl={anchorEl}
handleClose={this.handleMenuClose}
Expand Down

0 comments on commit fb9634c

Please sign in to comment.