Skip to content

Commit f556fa7

Browse files
committed
nav component issue fixes, component updates in progress
1 parent a055656 commit f556fa7

File tree

4 files changed

+58
-28
lines changed

4 files changed

+58
-28
lines changed

client/packages/lowcoder/src/comps/comps/buttonComp/linkComp.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ const Link = styled(Button) <{ $style: LinkStyleType }>`
3333
font-family:${props.$style.fontFamily};
3434
font-weight:${props.$style.textWeight};
3535
border: ${props.$style.borderWidth} solid ${props.$style.border};
36+
border-radius:${props.$style.radius ? props.$style.radius:'0px'};
3637
background-color: ${props.$style.background};
3738
&:hover {
3839
color: ${props.$style.hoverText} !important;
@@ -41,7 +42,8 @@ const Link = styled(Button) <{ $style: LinkStyleType }>`
4142
color: ${props.$style.activeText} !important;
4243
}
4344
`}
44-
&.ant-btn {
45+
46+
&.ant-btn {
4547
display: inline-flex;
4648
align-items: center;
4749
> span {

client/packages/lowcoder/src/comps/comps/navComp/navComp.tsx

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,18 +24,19 @@ type IProps = {
2424
$bgColor: string;
2525
$borderColor: string;
2626
$borderWidth: string;
27+
$borderRadius: string;
2728
};
2829

29-
const Wrapper = styled("div") <Pick<IProps, "$bgColor" | "$borderColor" | "$borderWidth">>`
30+
const Wrapper = styled("div") <Pick<IProps, "$bgColor" | "$borderColor" | "$borderWidth" | "$borderRadius">>`
3031
height: 100%;
31-
border-radius: 2px;
32+
border-radius: ${(props) => props.$borderRadius ? props.$borderRadius : '2px'};
3233
box-sizing: border-box;
3334
border: ${(props) => props.$borderWidth ? `${props.$borderWidth}` : '1px'} solid ${(props) => props.$borderColor};
3435
background-color: ${(props) => props.$bgColor};
3536
`;
3637

3738
const NavInner = styled("div") <Pick<IProps, "$justify">>`
38-
margin: 0 -16px;
39+
// margin: 0 -16px;
3940
height: 100%;
4041
display: flex;
4142
justify-content: ${(props) => (props.$justify ? "space-between" : "left")};
@@ -49,17 +50,19 @@ const Item = styled.div<{
4950
$fontStyle: string;
5051
$textWeight: string;
5152
$textSize: string;
53+
$margin: string;
54+
$padding: string;
5255
}>`
5356
height: 30px;
5457
line-height: 30px;
55-
padding: 0 16px;
58+
padding: ${(props) => props.$padding ? props.$padding : '0 16px'};
5659
color: ${(props) => (props.$active ? props.$activeColor : props.$color)};
5760
font-weight: ${(props) => (props.$textWeight ? props.$textWeight : 500)};
5861
font-family:${(props) => (props.$fontFamily ? props.$fontFamily : 'sans-serif')};
5962
font-style:${(props) => (props.$fontStyle ? props.$fontStyle : 'normal')};
60-
font-size:${(props) => (props.$textSize ? props.$textSize : '14px')}
61-
62-
63+
font-size:${(props) => (props.$textSize ? props.$textSize : '14px')};
64+
margin:${(props) => props.$margin ? props.$margin : '0px'};
65+
6366
&:hover {
6467
color: ${(props) => props.$activeColor};
6568
cursor: pointer;
@@ -157,6 +160,8 @@ const NavCompBase = new UICompBuilder(childrenMap, (props) => {
157160
$fontStyle={props.style.fontStyle}
158161
$textWeight={props.style.textWeight}
159162
$textSize={props.style.textSize}
163+
$padding={props.style.padding}
164+
$margin={props.style.margin}
160165
onClick={() => onEvent("click")}
161166
>
162167
{label}
@@ -195,6 +200,7 @@ const NavCompBase = new UICompBuilder(childrenMap, (props) => {
195200
$borderColor={props.style.border}
196201
$bgColor={props.style.background}
197202
$borderWidth={props.style.borderWidth}
203+
$borderRadius={props.style.borderRadius}
198204
>
199205
<NavInner $justify={justify}>
200206
{props.logoUrl && (

client/packages/lowcoder/src/comps/comps/textInputComp/mentionComp.tsx

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,17 @@ let MentionTmpComp = (function () {
192192
label: value,
193193
}))}
194194
autoSize={props.autoHeight}
195-
style={{ height: "100%", maxHeight: "100%", resize: "none", padding: props.style.padding, fontStyle: props.style.fontStyle, fontFamily: props.style.fontFamily, borderWidth: props.style.borderWidth, fontWeight: props.style.textWeight }}
195+
style={{
196+
height: "100%",
197+
maxHeight: "100%",
198+
resize: "none",
199+
padding: props.style.padding,
200+
fontStyle: props.style.fontStyle,
201+
fontFamily: props.style.fontFamily,
202+
borderWidth: props.style.borderWidth,
203+
fontWeight: props.style.textWeight,
204+
fontSize: props.style.textSize
205+
}}
196206
readOnly={props.readOnly}
197207
/>
198208
</ConfigProvider>

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

Lines changed: 31 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -476,7 +476,8 @@ function replaceAndMergeMultipleStyles(originalArray: any[], styleToReplace: str
476476
}
477477

478478
export const ButtonStyle = [
479-
...getBgBorderRadiusByBg("primary"),
479+
// ...getBgBorderRadiusByBg("primary"),
480+
getBackground('primary'),
480481
...STYLING_FIELDS_SEQUENCE
481482
] as const;
482483

@@ -1084,30 +1085,41 @@ export const ProgressStyle = [
10841085
depTheme: "canvas",
10851086
depType: DEP_TYPE.CONTRAST_TEXT,
10861087
transformer: contrastText,
1087-
}]).filter((style)=> ['border','borderWidth'].includes(style.name) === false),
1088+
}]).filter((style) => ['border', 'borderWidth'].includes(style.name) === false),
10881089
TRACK,
10891090
FILL,
10901091
SUCCESS,
10911092
] as const;
10921093

10931094
export const NavigationStyle = [
1094-
{
1095-
name: "text",
1096-
label: trans("text"),
1097-
depName: "background",
1098-
depType: DEP_TYPE.CONTRAST_TEXT,
1099-
transformer: contrastText,
1100-
},
1101-
ACCENT,
1102-
getStaticBackground("#FFFFFF00"),
1103-
getStaticBorder("#FFFFFF00"),
1104-
MARGIN,
1105-
PADDING,
1106-
FONT_FAMILY,
1107-
FONT_STYLE,
1108-
TEXT_WEIGHT,
1109-
TEXT_SIZE,
1110-
BORDER_WIDTH
1095+
...replaceAndMergeMultipleStyles(STYLING_FIELDS_SEQUENCE, 'text', [
1096+
{
1097+
name: "text",
1098+
label: trans("text"),
1099+
depName: "background",
1100+
depType: DEP_TYPE.CONTRAST_TEXT,
1101+
transformer: contrastText,
1102+
},
1103+
ACCENT,
1104+
getStaticBackground("#FFFFFF00")
1105+
])
1106+
// {
1107+
// name: "text",
1108+
// label: trans("text"),
1109+
// depName: "background",
1110+
// depType: DEP_TYPE.CONTRAST_TEXT,
1111+
// transformer: contrastText,
1112+
// },
1113+
// ACCENT,
1114+
// getStaticBackground("#FFFFFF00"),
1115+
// getStaticBorder("#FFFFFF00"),
1116+
// MARGIN,
1117+
// PADDING,
1118+
// FONT_FAMILY,
1119+
// FONT_STYLE,
1120+
// TEXT_WEIGHT,
1121+
// TEXT_SIZE,
1122+
// BORDER_WIDTH
11111123
] as const;
11121124

11131125
export const ImageStyle = [getStaticBorder("#00000000"), RADIUS, BORDER_WIDTH, MARGIN, PADDING] as const;

0 commit comments

Comments
 (0)