From d873f3a3cd682b4aad4fbc152c3eb2e6ade4d694 Mon Sep 17 00:00:00 2001 From: Sultan <105234327+natlusyht@users.noreply.github.com> Date: Sat, 23 Jul 2022 17:09:24 +0300 Subject: [PATCH] row and column grid orientations --- .../features/style-panel/style-section.tsx | 46 +++++++++---------- 1 file changed, 22 insertions(+), 24 deletions(-) diff --git a/apps/designer/app/designer/features/style-panel/style-section.tsx b/apps/designer/app/designer/features/style-panel/style-section.tsx index b6bd3dbf8e..2a72ef315b 100644 --- a/apps/designer/app/designer/features/style-panel/style-section.tsx +++ b/apps/designer/app/designer/features/style-panel/style-section.tsx @@ -339,24 +339,10 @@ const GridControl = ({ currentStyle: Style; setProperty: SetProperty; }) => { - const direction = (currentStyle.flexDirection?.value as string).includes( - "column" - ); - const orientation = (currentStyle.flexDirection?.value as string).includes( - "reverse" - ); + const flexDirection = currentStyle.flexDirection?.value as string; + const direction = Number(flexDirection.includes("column")); + const orientation = Number(flexDirection.includes("reverse")); const cells = ["a1", "a2", "a3", "b1", "b2", "b3", "c1", "c2", "c3"]; - const align = [ - "start", - "center", - "end", - "start", - "center", - "end", - "start", - "center", - "end", - ]; const [position, setPosition] = useState(0); return ( {["60%", "100%", "60%"].map((value, index) => (