Skip to content

Commit

Permalink
Merge pull request #3843 from ProjectMirador/mui5-badge-color
Browse files Browse the repository at this point in the history
Use Badge color instead of custom styling
  • Loading branch information
marlo-longley authored Dec 5, 2023
2 parents 95d12e4 + 1e57133 commit 8ff56d6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
3 changes: 2 additions & 1 deletion __tests__/utils/test-utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,10 @@ import { createStore, applyMiddleware } from 'redux';
import thunkMiddleware from 'redux-thunk';
import { createTheme, ThemeProvider } from '@mui/material/styles';
import createRootReducer from '../../src/state/reducers/rootReducer';
import settings from '../../src/config/settings';

const rootReducer = createRootReducer();
const theme = createTheme();
const theme = createTheme(settings.theme);

/**
* Hook up our rendered object to redux
Expand Down
6 changes: 3 additions & 3 deletions src/components/WindowSideBarButtons.js
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ export class WindowSideBarButtons extends Component {
onKeyUp={this.handleKeyUp}
t={t}
icon={(
<Badge overlap="rectangular" sx={{ '.MuiBadge-badge': { backgroundColor: 'notification.main' } }} invisible={!hasAnnotations} variant="dot">
<Badge overlap="rectangular" color="notification" invisible={!hasAnnotations} variant="dot">
<AnnotationIcon />
</Badge>
)}
Expand All @@ -162,7 +162,7 @@ export class WindowSideBarButtons extends Component {
onKeyUp={this.handleKeyUp}
t={t}
icon={(
<Badge overlap="rectangular" sx={{ '.MuiBadge-badge': { backgroundColor: 'notification.main' } }} invisible={!hasSearchResults} variant="dot">
<Badge overlap="rectangular" color="notification" invisible={!hasSearchResults} variant="dot">
<SearchIcon />
</Badge>
)}
Expand All @@ -174,7 +174,7 @@ export class WindowSideBarButtons extends Component {
onKeyUp={this.handleKeyUp}
t={t}
icon={(
<Badge overlap="rectangular" sx={{ '.MuiBadge-badge': { backgroundColor: 'notification.main' } }} invisible={!hasCurrentLayers} variant="dot">
<Badge overlap="rectangular" color="notification" invisible={!hasCurrentLayers} variant="dot">
<LayersIcon />
</Badge>
)}
Expand Down

0 comments on commit 8ff56d6

Please sign in to comment.