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

map btn control hover fix #1104

Merged
merged 1 commit into from
Apr 8, 2024
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
9 changes: 2 additions & 7 deletions src/components/map/controls/zoom/component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import ZOOM_IN_SVG from 'svgs/map/zoom-in.svg?sprite';
import ZOOM_OUT_SVG from 'svgs/map/zoom-out.svg?sprite';

const COMMON_CLASSES =
'group w-full w-12 px-4 hover:bg-gray-100 active:outline active:outline-2 active:-outline-offset-[5px] active:outline-brand-400/40 disabled:bg-gray-50 disabled:outline-none';
'bg-white group w-full w-12 p-4 hover:bg-gray-100 active:outline active:outline-2 active:-outline-offset-[5px] active:outline-brand-400/40 disabled:bg-gray-50 disabled:outline-none hover:gray-100';

const SVG_COMMON_CLASSES = 'h-4 w-4 group-disabled:fill-grey-75';

Expand Down Expand Up @@ -41,12 +41,7 @@ export const ZoomControl = ({ className, mapId }: { className?: string; mapId: s
);

return (
<div
className={cn({
'inline-flex w-full flex-col space-y-4 bg-white py-4': true,
[className]: !!className,
})}
>
<div className={cn({ 'flex flex-col': true, [className]: !!className })}>
<button
className={cn({
[COMMON_CLASSES]: true,
Expand Down
2 changes: 1 addition & 1 deletion src/containers/map/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -395,7 +395,7 @@ const MapContainer = ({ mapId }: { mapId: string }) => {
}
/>
<BasemapSettingsControl />
<div className="border-box flex flex-col overflow-hidden rounded-4xl bg-white shadow-control">
<div className="border-box flex flex-col overflow-hidden rounded-4xl shadow-control">
<ZoomControl mapId={mapId} />
{pitch !== 0 && <PitchReset mapId={mapId} />}
</div>
Expand Down
Loading