From f4b5a4ebb9e0b6c302c7890a81ae603c41e71ffc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Prod=27homme?= Date: Wed, 6 Nov 2024 17:14:35 +0100 Subject: [PATCH] refactor(client): Reorganise the map controls SS-100 --- .../map/controls/contextual-layers.tsx | 6 ++--- client/src/components/map/controls/index.tsx | 23 ++++--------------- .../components/map/controls/map-settings.tsx | 2 +- client/src/components/ui/popover.tsx | 2 +- 4 files changed, 10 insertions(+), 23 deletions(-) diff --git a/client/src/components/map/controls/contextual-layers.tsx b/client/src/components/map/controls/contextual-layers.tsx index 0f5f9a5..97417fa 100644 --- a/client/src/components/map/controls/contextual-layers.tsx +++ b/client/src/components/map/controls/contextual-layers.tsx @@ -7,9 +7,9 @@ const ContextualLayersControls = () => { return ( - { - const [layers] = useMapLayers(); - return ( <> -
0, - "bottom-[80px]": layers.length === 0, - })} - > +
-
-
-
- - -
+ +
+
+
); diff --git a/client/src/components/map/controls/map-settings.tsx b/client/src/components/map/controls/map-settings.tsx index e7fcaaa..8b22151 100644 --- a/client/src/components/map/controls/map-settings.tsx +++ b/client/src/components/map/controls/map-settings.tsx @@ -12,7 +12,7 @@ const MapSettingsControls = () => { - + diff --git a/client/src/components/ui/popover.tsx b/client/src/components/ui/popover.tsx index 93d7f0f..666e41d 100644 --- a/client/src/components/ui/popover.tsx +++ b/client/src/components/ui/popover.tsx @@ -29,7 +29,7 @@ const PopoverContent = React.forwardRef< React.ElementRef, React.ComponentPropsWithoutRef & VariantProps ->(({ variant, className, align = "center", sideOffset = 24, ...props }, ref) => ( +>(({ variant, className, align = "center", sideOffset = 16, ...props }, ref) => (