Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use MenuItem divider prop instead of styling it ourselves #3829

Merged
merged 1 commit into from
Nov 30, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions src/components/CanvasAnnotations.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,14 +73,12 @@ export class CanvasAnnotations extends Component {
<MenuItem
component={listContainerComponent}
variant="multiline"
divider
sx={{
'&:hover,&:focus': {
backgroundColor: 'action.hover',
},
backgroundColor: hoveredAnnotationIds.includes(annotation.id) ? 'action.hover' : '',
borderBottom: '0.5px solid',
borderBottomColor: 'divider',
cursor: 'pointer',
}}
key={annotation.id}
annotationid={annotation.id}
Expand Down
3 changes: 1 addition & 2 deletions src/components/CanvasLayers.js
Original file line number Diff line number Diff line change
Expand Up @@ -226,10 +226,9 @@ export class CanvasLayers extends Component {
ref={provided.innerRef}
{...provided.draggableProps}
component="li"
divider
sx={{
alignItems: 'stretch',
borderBottom: '0.5px solid',
borderBottomColor: 'divider',
cursor: 'pointer',
paddingBottom: 2,
paddingRight: 2,
Expand Down
3 changes: 1 addition & 2 deletions src/components/WindowSideBarCollectionPanel.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,10 @@ function Item({
<MenuItem
alignItems="flex-start"
button
divider
component="li"
variant="multiline"
sx={{
borderBottom: '0.5px solid',
borderBottomColor: 'divider',
paddingRight: 1,
}}
{...otherProps}
Expand Down
1 change: 0 additions & 1 deletion src/components/WorkspaceOptionsButton.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { Component } from 'react';
import PropTypes from 'prop-types';
import { styled } from '@mui/material/styles';
import MoreHorizontalIcon from '@mui/icons-material/MoreHorizSharp';
import MiradorMenuButton from '../containers/MiradorMenuButton';
import WorkspaceOptionsMenu from '../containers/WorkspaceOptionsMenu';
Expand Down