Skip to content

Commit

Permalink
fixup! front: update btn map in scenario page
Browse files Browse the repository at this point in the history
  • Loading branch information
theocrsb committed Dec 3, 2024
1 parent d81de37 commit 211da1d
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 17 deletions.
6 changes: 3 additions & 3 deletions front/src/common/Map/Buttons/MapButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import Tipped from 'common/Tipped';

type MapButtonProps = {
onClick: () => void;
isNewButtons: boolean;
isNewButton: boolean;
icon: ReactNode;
tooltipKey: string;
extraClasses?: string;
Expand All @@ -15,7 +15,7 @@ type MapButtonProps = {

const MapButton = ({
onClick,
isNewButtons,
isNewButton,
icon,
tooltipKey,
extraClasses = '',
Expand All @@ -27,7 +27,7 @@ const MapButton = ({
<Tipped mode="left">
<button
type="button"
className={`${isNewButtons ? 'new-btn-map' : 'btn-rounded btn-rounded-white'} ${extraClasses}`}
className={`${isNewButton ? 'new-btn-map' : 'btn-rounded btn-rounded-white'} ${extraClasses}`}
onClick={onClick}
data-testid={dataTestId}
>
Expand Down
12 changes: 6 additions & 6 deletions front/src/common/Map/Buttons/MapButtons.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -163,19 +163,19 @@ export default function MapButtons({
>
<MapButton
onClick={zoomIn}
isNewButtons={isNewButtons}
isNewButton={isNewButtons}
icon={<ZoomIn />}
tooltipKey="common.zoom-in"
/>
<MapButton
onClick={zoomOut}
isNewButtons={isNewButtons}
isNewButton={isNewButtons}
icon={<ZoomOut />}
tooltipKey="common.zoom-out"
/>
<MapButton
onClick={resetPitchBearing}
isNewButtons={isNewButtons}
isNewButton={isNewButtons}
icon={
<>
<span className="compass-needle" style={rotationStyle}>
Expand All @@ -191,20 +191,20 @@ export default function MapButtons({
/>
<MapButton
onClick={() => toggleMapModal('SEARCH')}
isNewButtons={isNewButtons}
isNewButton={isNewButtons}
icon={<Search />}
tooltipKey="common.search"
/>
<MapButton
onClick={openMapSettingsModal}
isNewButtons={isNewButtons}
isNewButton={isNewButtons}
icon={<Sliders />}
tooltipKey="Editor.nav.toggle-layers"
/>
{withMapKeyButton && (
<MapButton
onClick={() => toggleMapModal('KEY')}
isNewButtons={isNewButtons}
isNewButton={isNewButtons}
icon={<Info />}
tooltipKey="common.help-legend"
/>
Expand Down
16 changes: 8 additions & 8 deletions front/src/styles/scss/common/map/_map.scss
Original file line number Diff line number Diff line change
Expand Up @@ -56,15 +56,15 @@
height: 16px;
}
}
}

.new-btn-map-resetviewport {
.compass-needle,
.compass-cardinal {
position: absolute;
top: 16px;
left: 18px;
transform: translate(-40%, 0);
.new-btn-map-resetviewport {
.compass-needle,
.compass-cardinal {
position: absolute;
top: 16px;
left: 18px;
transform: translate(-40%, 0);
}
}
}

Expand Down

0 comments on commit 211da1d

Please sign in to comment.