From e29e08d3f1fd0772e1907bb2c1cca8baefbe8383 Mon Sep 17 00:00:00 2001 From: Nishit Suwal <81785002+NSUWAL123@users.noreply.github.com> Date: Wed, 10 Jul 2024 01:40:09 +0545 Subject: [PATCH] fix(frontend): avoid map legend overlay on small screens (dynamic size) (#1637) * fix(accordion): padding fix * fix(mapLegend): legend UI fix --- src/frontend/src/components/MapLegends.tsx | 25 ++++++++----------- .../src/components/common/Accordion.tsx | 2 +- src/frontend/src/views/ProjectDetailsV2.tsx | 6 ++--- 3 files changed, 15 insertions(+), 18 deletions(-) diff --git a/src/frontend/src/components/MapLegends.tsx b/src/frontend/src/components/MapLegends.tsx index 3fde7ad969..9289a1a4f9 100755 --- a/src/frontend/src/components/MapLegends.tsx +++ b/src/frontend/src/components/MapLegends.tsx @@ -52,26 +52,23 @@ const MapLegends = ({ defaultTheme }: { defaultTheme: any }) => { const LegendListItem = ({ data }: { data: mapDetialsType }) => { return (
-
- {data.type !== 'locked' ? ( - - ) : ( - - )} -
-

{data.value}

+ {data.type !== 'locked' ? ( +
+ ) : ( + + )} +

{data.value}

); }; return (
-
+
{MapDetails.map((data, index) => { return ; })} diff --git a/src/frontend/src/components/common/Accordion.tsx b/src/frontend/src/components/common/Accordion.tsx index 6fd0c17519..976cccaec0 100644 --- a/src/frontend/src/components/common/Accordion.tsx +++ b/src/frontend/src/components/common/Accordion.tsx @@ -33,7 +33,7 @@ export default function Accordion({
{ diff --git a/src/frontend/src/views/ProjectDetailsV2.tsx b/src/frontend/src/views/ProjectDetailsV2.tsx index dd35226aee..9b23bf358a 100644 --- a/src/frontend/src/views/ProjectDetailsV2.tsx +++ b/src/frontend/src/views/ProjectDetailsV2.tsx @@ -509,14 +509,14 @@ const ProjectDetailsV2 = () => { popupId="locked-popup" className="fmtm-w-[235px]" /> -
+
} header={
- -

Legend

+ +

LEGEND

} onToggle={() => {