From 1e609157e81ea7c5ec09baaabc6e68c9447ca1db Mon Sep 17 00:00:00 2001 From: Sultan <105234327+natlusyht@users.noreply.github.com> Date: Thu, 4 Aug 2022 18:30:17 +0300 Subject: [PATCH] fix align-items rendering quirk, address review suggestions --- .../features/style-panel/shared/configs.ts | 4 +- .../features/style-panel/style-section.tsx | 37 +++++++++---------- .../src/components/icon-button-with-menu.tsx | 24 +++++------- packages/design-system/src/stitches.config.ts | 2 + 4 files changed, 30 insertions(+), 37 deletions(-) diff --git a/apps/designer/app/designer/features/style-panel/shared/configs.ts b/apps/designer/app/designer/features/style-panel/shared/configs.ts index 531d7b9071..ad0fe1e975 100644 --- a/apps/designer/app/designer/features/style-panel/shared/configs.ts +++ b/apps/designer/app/designer/features/style-panel/shared/configs.ts @@ -22,13 +22,11 @@ export type Control = | "Select" | "Empty"; -type StyleConfigWithItems = BaseStyleConfig & { +export type StyleConfig = BaseStyleConfig & { control: Control; items: Array<{ label: string; name: string }>; }; -export type StyleConfig = StyleConfigWithItems; - type Property = keyof typeof keywordValues; const getControl = (property: StyleProperty): Control => { 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 45d2ae1550..f5afe0bf14 100644 --- a/apps/designer/app/designer/features/style-panel/style-section.tsx +++ b/apps/designer/app/designer/features/style-panel/style-section.tsx @@ -211,7 +211,7 @@ const ComboboxControl = ({ // } // }, []); - if (styleConfig.control !== "Combobox") return null; + // if (styleConfig.control !== "Combobox") return null; // @todo show which instance we inherited the value from const value = getFinalValue({ @@ -349,7 +349,7 @@ const SelectControl = ({ label={styleConfig.label} css={{ fontWeight: "500", - marginRight: "4px", + marginRight: "$sizes$1", }} />