Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitc5640ad

Browse files
committed
added lineHeight as css property
1 parent4c8dd4e commitc5640ad

File tree

9 files changed

+17
-14
lines changed

9 files changed

+17
-14
lines changed

‎client/packages/lowcoder/src/comps/comps/buttonComp/buttonCompConstants.tsx‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ export const Button100 = styled(Button)<{ $buttonStyle?: ButtonStyleType }>`
6565
overflow: hidden;
6666
text-overflow: ellipsis;
6767
}
68+
line-height:${(props)=>props.$buttonStyle?.lineHeight};
6869
`;
6970

7071
exportconstButtonCompWrapper=styled.div<{disabled:boolean}>`

‎client/packages/lowcoder/src/comps/comps/buttonComp/dropdownComp.tsx‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ const LeftButtonWrapper = styled.div<{ $buttonStyle: DropdownStyleType }>`
6060
${(props)=>`font-style:${props.$buttonStyle.fontStyle};`}
6161
6262
width: 100%;
63+
line-height:${(props)=>props.$buttonStyle.lineHeight};
6364
}
6465
6566
`;

‎client/packages/lowcoder/src/comps/comps/numberInputComp/numberInputComp.tsx‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ const getStyle = (style: InputLikeStyleType) => {
6060
returncss`
6161
border-radius:${style.radius};
6262
border-width:${style.borderWidth}!important;
63+
line-height:${style.lineHeight}!important;
6364
// still use antd style when disabled
6465
&:not(.ant-input-number-disabled) {
6566
color:${style.text};

‎client/packages/lowcoder/src/comps/comps/selectInputComp/selectCompConstants.tsx‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -203,6 +203,7 @@ const DropdownStyled = styled.div<{ $style: ChildrenMultiSelectStyleType }>`
203203
font-weight:${props=>props.$style?.textWeight};
204204
text-transform:${props=>props.$style?.textTransform};
205205
color:${props=>props.$style?.text};
206+
line-height:${props=>props.$style?.lineHeight};
206207
}
207208
.option-label{
208209
text-decoration:${props=>props.$style?.textDecoration} !important;

‎client/packages/lowcoder/src/comps/comps/textComp.tsx‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ const getStyle = (style: TextStyleType) => {
6464
h6 {
6565
color:${style.text};
6666
font-weight:${style.textWeight}!important;
67+
line-height:${style.lineHeight};
6768
}
6869
img,
6970
pre {

‎client/packages/lowcoder/src/comps/comps/textInputComp/textInputConstants.tsx‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -252,6 +252,7 @@ export function getStyle(style: InputLikeStyleType, labelStyle?: LabelStyleType)
252252
text-decoration:${style.textDecoration};
253253
background-color:${style.background};
254254
border-color:${style.border};
255+
line-height:${style.lineHeight};
255256
256257
&:focus,
257258
&.ant-input-affix-wrapper-focused {

‎client/packages/lowcoder/src/comps/controls/labelControl.tsx‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,7 @@ const Label = styled.span<{ $border: boolean, $labelStyle: LabelStyleType, $vali
108108
border-radius:${(props)=>props.$labelStyle.radius};
109109
padding:${(props)=>props.$labelStyle.padding};
110110
margin:${(props)=>props.$labelStyle.margin};
111+
line-height:${(props)=>props.$labelStyle.lineHeight};
111112
width: fit-content;
112113
user-select: text;
113114
white-space: nowrap;

‎client/packages/lowcoder/src/comps/controls/styleControl.tsx‎

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -376,7 +376,6 @@ function calcColors<ColorMap extends Record<string, string>>(
376376
if(compType&&styleKey&&inputFieldComps.includes(compType)&&styleKey!=='inputFieldStyle'){
377377
conststyle=theme?.components?.[compType]?.[styleKey]asRecord<string,string>;
378378
themeWithDefault['borderWidth']=style?.['borderWidth']||'0px';
379-
console.log("The values are ",themeWithDefault)
380379
}
381380

382381
// Cover what is not there for the first pass
@@ -649,8 +648,6 @@ function calcColors<ColorMap extends Record<string, string>>(
649648
if(isLineHeightConfig(config)){
650649

651650
res[name]=themeWithDefault[config.lineHeight]||'20px';
652-
console.log("The 2nd Values are",themeWithDefault);
653-
console.log("The 2nd Values are",isLineHeightConfig);
654651
}
655652
});
656653
// The second pass calculates dep
@@ -689,7 +686,6 @@ function calcColors<ColorMap extends Record<string, string>>(
689686
res[name]=themeWithDefault[config.name]
690687
}
691688
});
692-
console.log("The defaults are ",themeWithDefault)
693689
returnresasColorMap;
694690
}
695691

@@ -1327,13 +1323,13 @@ export function styleControl<T extends readonly SingleColorConfig[]>(
13271323
props[name],
13281324
})
13291325
:name==='lineHeight'// Added lineHeight here
1330-
?(
1331-
children[name]asInstanceType<typeofStringControl>
1332-
).propertyView({
1333-
label:config.label,
1334-
preInputNode:<LineHeightPropIcontitle="Line Height"/>,
1335-
placeholder:props[name],
1336-
})
1326+
?(
1327+
children[name]asInstanceType<typeofStringControl>
1328+
).propertyView({
1329+
label:config.label,
1330+
preInputNode:<LineHeightPropIcontitle="Line Height"/>,
1331+
placeholder:props[name],
1332+
})
13371333
:children[
13381334
name
13391335
].propertyView({

‎client/packages/lowcoder/src/comps/controls/styleControlConstants.tsx‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -779,7 +779,7 @@ function replaceAndMergeMultipleStyles(
779779

780780
exportconstButtonStyle=[
781781
getBackground('primary'),
782-
...STYLING_FIELDS_SEQUENCE
782+
...STYLING_FIELDS_SEQUENCE.filter(style=>style.name!=='lineHeight'),
783783
]asconst;
784784

785785
exportconstDropdownStyle=[
@@ -1197,7 +1197,7 @@ export const SwitchStyle = [
11971197
]asconst;
11981198

11991199
exportconstSelectStyle=[
1200-
...replaceAndMergeMultipleStyles(STYLING_FIELDS_SEQUENCE.filter(style=>style.name!=='rotation'),"border",[
1200+
...replaceAndMergeMultipleStyles(STYLING_FIELDS_SEQUENCE.filter(style=>style.name!=='rotation'&&style.name!=='lineHeight'),"border",[
12011201
...getStaticBgBorderRadiusByBg(SURFACE_COLOR,"pc"),
12021202
]),
12031203
BOXSHADOW,
@@ -1206,7 +1206,7 @@ export const SelectStyle = [
12061206
]asconst;
12071207

12081208
constmultiSelectCommon=[
1209-
...replaceAndMergeMultipleStyles(STYLING_FIELDS_SEQUENCE.filter(style=>style.name!=='rotation'),"border",[
1209+
...replaceAndMergeMultipleStyles(STYLING_FIELDS_SEQUENCE.filter(style=>style.name!=='rotation'&&style.name!=='lineHeight'),"border",[
12101210
...getStaticBgBorderRadiusByBg(SURFACE_COLOR,"pc"),
12111211
]),
12121212
{

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp