Skip to content

Commit

Permalink
migrate ListItem to v6
Browse files Browse the repository at this point in the history
  • Loading branch information
zbycz committed Oct 12, 2024
1 parent ee161be commit e527c3b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions src/components/LayerSwitcher/LayerSwitcherContent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import {
ListItemText,
ListItemSecondaryAction,
Tooltip,
ListItemButton,
} from '@mui/material';
import { dotToOptionalBr } from '../helpers';
import {
Expand Down Expand Up @@ -75,8 +76,7 @@ export const LayerSwitcherContent = () => {
const isOutsideOfView =
bboxes && !bboxes.some((b) => isViewInsideBbox(view, b));
return (
<ListItem
button
<ListItemButton
key={key}
selected={activeLayers.includes(key)}
onClick={setActiveBaseMap}
Expand All @@ -102,7 +102,7 @@ export const LayerSwitcherContent = () => {
/>
)}
</ListItemSecondaryAction>
</ListItem>
</ListItemButton>
);
})}
</StyledList>
Expand Down
6 changes: 3 additions & 3 deletions src/components/LayerSwitcher/Overlays.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from 'react';
import {
Checkbox,
ListItem,
ListItemButton,
ListItemSecondaryAction,
ListItemText,
Typography,
Expand Down Expand Up @@ -47,7 +47,7 @@ export const Overlays = ({
);

return (
<ListItem button onClick={toggleOverlayLayer} key={key}>
<ListItemButton onClick={toggleOverlayLayer} key={key}>
<LayerIcon Icon={Icon} />
<ListItemText primary={dotToOptionalBr(name)} />
<ListItemSecondaryAction>
Expand All @@ -57,7 +57,7 @@ export const Overlays = ({
onClick={toggleOverlayLayer}
/>
</ListItemSecondaryAction>
</ListItem>
</ListItemButton>
);
})}
</StyledList>
Expand Down

0 comments on commit e527c3b

Please sign in to comment.