From 7129ccfd6c852c93afc8dc193f0e8083838aa082 Mon Sep 17 00:00:00 2001 From: MenamAfzal Date: Thu, 1 Aug 2024 19:28:29 +0500 Subject: [PATCH] line height removed from single liner input fields --- .../src/comps/comps/numberInputComp/numberInputComp.tsx | 2 +- .../src/comps/comps/textInputComp/textInputConstants.tsx | 2 +- client/packages/lowcoder/src/comps/controls/labelControl.tsx | 2 +- .../lowcoder/src/comps/controls/styleControlConstants.tsx | 3 ++- 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/client/packages/lowcoder/src/comps/comps/numberInputComp/numberInputComp.tsx b/client/packages/lowcoder/src/comps/comps/numberInputComp/numberInputComp.tsx index 655aa8e9a..298e2e900 100644 --- a/client/packages/lowcoder/src/comps/comps/numberInputComp/numberInputComp.tsx +++ b/client/packages/lowcoder/src/comps/comps/numberInputComp/numberInputComp.tsx @@ -60,7 +60,7 @@ const getStyle = (style: InputLikeStyleType) => { return css` border-radius: ${style.radius}; border-width:${style.borderWidth} !important; - line-height: ${style.lineHeight} !important; + // line-height: ${style.lineHeight} !important; // still use antd style when disabled &:not(.ant-input-number-disabled) { color: ${style.text}; diff --git a/client/packages/lowcoder/src/comps/comps/textInputComp/textInputConstants.tsx b/client/packages/lowcoder/src/comps/comps/textInputComp/textInputConstants.tsx index 2532912bc..0cf64092a 100644 --- a/client/packages/lowcoder/src/comps/comps/textInputComp/textInputConstants.tsx +++ b/client/packages/lowcoder/src/comps/comps/textInputComp/textInputConstants.tsx @@ -252,7 +252,7 @@ export function getStyle(style: InputLikeStyleType, labelStyle?: LabelStyleType) text-decoration:${style.textDecoration}; background-color: ${style.background}; border-color: ${style.border}; - line-height: ${style.lineHeight}; + // line-height: ${style.lineHeight}; &:focus, &.ant-input-affix-wrapper-focused { diff --git a/client/packages/lowcoder/src/comps/controls/labelControl.tsx b/client/packages/lowcoder/src/comps/controls/labelControl.tsx index ef93db58e..7d8b4ad8f 100644 --- a/client/packages/lowcoder/src/comps/controls/labelControl.tsx +++ b/client/packages/lowcoder/src/comps/controls/labelControl.tsx @@ -108,7 +108,7 @@ const Label = styled.span<{ $border: boolean, $labelStyle: LabelStyleType, $vali border-radius:${(props) => props.$labelStyle.radius}; padding:${(props) => props.$labelStyle.padding}; margin:${(props) => props.$labelStyle.margin}; - line-height:${(props) => props.$labelStyle.lineHeight}; + // line-height:${(props) => props.$labelStyle.lineHeight}; width: fit-content; user-select: text; white-space: nowrap; diff --git a/client/packages/lowcoder/src/comps/controls/styleControlConstants.tsx b/client/packages/lowcoder/src/comps/controls/styleControlConstants.tsx index 47717d578..37dee183a 100644 --- a/client/packages/lowcoder/src/comps/controls/styleControlConstants.tsx +++ b/client/packages/lowcoder/src/comps/controls/styleControlConstants.tsx @@ -1039,7 +1039,7 @@ export const InputLikeStyle = [ getStaticBackground(SURFACE_COLOR), BOXSHADOW, BOXSHADOWCOLOR, - ...STYLING_FIELDS_SEQUENCE.filter(style=>style.name!=='rotation'), + ...STYLING_FIELDS_SEQUENCE.filter((style)=>style.name!=='rotation' && style.name!=='lineHeight'), ...ACCENT_VALIDATE, ] as const; @@ -1138,6 +1138,7 @@ export const startButtonStyle = [ export const LabelStyle = [ ...replaceAndMergeMultipleStyles([...InputLikeStyle], "text", [LABEL]).filter( (style) => style.name !== "radius" && style.name !== "background" && style.name!=='rotation' && style.name !== "boxShadow"&&style.name!=='boxShadowColor' + &&style.name!=='lineHeight' ), ];