Skip to content

Commit 0013e87

Browse files
Merge pull request #957 from MenamAfzal/fix/padding-condition
Fix/padding condition
2 parents 57bcb7f + aeaa42f commit 0013e87

File tree

12 files changed

+39
-13
lines changed

12 files changed

+39
-13
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ const Link = styled(Button)<{
3737
font-style:${props.$style.fontStyle};
3838
font-family:${props.$style.fontFamily};
3939
font-weight:${props.$style.textWeight};
40-
border: ${props.$style.borderWidth} solid ${props.$style.border};
40+
border: ${props.$style.borderWidth} ${props.$style.borderStyle} ${props.$style.border};
4141
border-radius:${props.$style.radius ? props.$style.radius:'0px'};
4242
text-transform:${props.$style.textTransform ? props.$style.textTransform:''};
4343
text-decoration:${props.$style.textDecoration ? props.$style.textDecoration:''} !important;

client/packages/lowcoder/src/comps/comps/containerComp/cardComp.tsx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,10 @@ const Wrapper = styled.div<{
4949
margin: ${props => props.$headerStyle?.margin};
5050
padding: ${props => props.$headerStyle?.padding};
5151
}
52+
.ant-card-head-title{
53+
font-size: ${props => props.$headerStyle?.textSize};
54+
font-family: ${props => props.$headerStyle?.fontFamily};
55+
}
5256
.ant-card .ant-card-actions {
5357
border-top: 1px solid ${props => props.$style?.border};
5458
}
@@ -72,6 +76,8 @@ const Wrapper = styled.div<{
7276
display: flex;
7377
flex-direction: column;
7478
justify-content: space-between;
79+
margin: ${props => props.$style?.margin};
80+
padding: ${props => props.$style?.padding};
7581
background-color: ${props => props.$style?.background};
7682
border: ${props => props.$style?.border};
7783
rotate: ${props => props.$style?.rotation};

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ type IProps = DividerProps & {
2727

2828
const StyledDivider = styled(Divider) <IProps>`
2929
margin-top: 3.5px;
30+
rotate:${props=>props.$style.rotation};
3031
.ant-divider-inner-text {
3132
height: 32px;
3233
display: flex;
@@ -50,8 +51,8 @@ const StyledDivider = styled(Divider) <IProps>`
5051
return props.$style.margin;
5152
}};
5253
padding: ${(props) => props.$style.padding};
53-
54-
border-top: ${(props) => (props.$style.borderWidth && props.$style.borderWidth != "0px" ? props.$style.borderWidth : "1px")} ${(props) => (props.dashed ? "dashed" : "solid")} ${(props) => props.$style.border};
54+
border-radius:${props=>props.$style.radius};
55+
border-top: ${(props) => (props.$style.borderWidth && props.$style.borderWidth != "0px" ? props.$style.borderWidth : "1px")} ${(props) => props.$style.borderStyle} ${(props) => props.$style.border};
5556
""
5657
.ant-divider-inner-text::before, .ant-divider-inner-text::after {
5758
border-block-start: ${(props) => (props.$style.borderWidth && props.$style.borderWidth != "0px" ? props.$style.borderWidth : "1px")} ${(props) => (props.dashed ? "dashed" : "solid")} ${(props) => props.$style.border} !important;

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,10 @@ const getStyle = (style: FileStyleType) => {
148148
font-weight:${style.textWeight};
149149
font-style:${style.fontStyle};
150150
border-width:${style.borderWidth};
151+
border-style:${style.borderStyle};
152+
text-decoration:${style.textDecoration};
153+
text-transform:${style.textTransform};
154+
text-transform:${style.textTransform};
151155
}
152156
153157
.ant-btn:not(:disabled) {

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,9 @@ const Wrapper = styled.div<{$style: IframeStyleType; $animationStyle:AnimationSt
2121
props.$style.borderWidth ? props.$style.borderWidth : '1px'}
2222
solid ${(props) => props.$style.border};
2323
border-radius: calc(min(${(props) => props.$style.radius}, 20px));
24-
rotate:${props => props.$style.rotation}
24+
rotate:${props => props.$style.rotation};
25+
margin:${props => props.$style.margin};
26+
padding:${props => props.$style.padding};
2527
${props=>props.$animationStyle}
2628
iframe {
2729
border: 0;

client/packages/lowcoder/src/comps/comps/mediaComp/colorPickerComp.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@ export function getStyle(style: ColorPickerStyleType) {
2323
&:not(.ant-input-disabled, .ant-input-affix-wrapper-disabled),
2424
input {
2525
background-color: ${style.background};
26+
color:${style.text};
27+
font-weight:${style.textWeight};
28+
font-family:${style.fontFamily};
2629
border-color: ${style.border};
2730
&:focus,
2831
&.ant-input-affix-wrapper-focused {

client/packages/lowcoder/src/comps/comps/meetingComp/controlButton.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ const Container = styled.div<{ $style: any }>`
5353
const getStyle = (style: any) => {
5454
return css`
5555
button {
56-
border: 1px solid ${style.border};
56+
border: ${style.borderWidth} ${style.borderStyle} ${style.border};
5757
border-radius: ${style.radius};
5858
margin: ${style.margin};
5959
rotate: ${style.rotation};

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

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,17 +29,18 @@ type IProps = {
2929
$borderColor: string;
3030
$borderWidth: string;
3131
$borderRadius: string;
32-
$animationStyle:AnimationStyleType;
32+
$borderStyle: string;
33+
$animationStyle: AnimationStyleType;
3334
};
3435

3536
const Wrapper = styled("div")<
36-
Pick<IProps, "$bgColor" | "$borderColor" | "$borderWidth" | "$borderRadius"|"$animationStyle">
37+
Pick<IProps, "$bgColor" | "$borderColor" | "$borderWidth" | "$borderRadius"|"$borderStyle"|"$animationStyle">
3738
>`
3839
${props=>props.$animationStyle}
3940
height: 100%;
40-
border-radius: ${(props) => props.$borderRadius ? props.$borderRadius : '2px'};
41+
border-radius: ${(props) =>props.$borderRadius ? props.$borderRadius : '2px'};
4142
box-sizing: border-box;
42-
border: ${(props) => props.$borderWidth ? `${props.$borderWidth}` : '1px'} solid ${(props) => props.$borderColor};
43+
border: ${(props) => props.$borderWidth ? `${props.$borderWidth}` : '1px'} ${props=>props.$borderStyle} ${(props) => props.$borderColor};
4344
background-color: ${(props) => props.$bgColor};
4445
`;
4546

@@ -212,11 +213,12 @@ const NavCompBase = new UICompBuilder(childrenMap, (props) => {
212213

213214
return (
214215
<Wrapper
216+
$borderStyle={props.style.borderStyle}
215217
$animationStyle={props.animationStyle}
216218
$borderColor={props.style.border}
217219
$bgColor={props.style.background}
218220
$borderWidth={props.style.borderWidth}
219-
$borderRadius={props.style.borderRadius}
221+
$borderRadius={props.style.radius}
220222
>
221223
<NavInner $justify={justify}>
222224
{props.logoUrl && (

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ const RowWrapper = styled(Row)<{
5050
${(props) => props.$animationStyle}
5151
height: 100%;
5252
border-radius: ${(props) => props.$style?.radius};
53-
border-width: ${(props) => props.$style?.borderWidth}px;
53+
border-width: ${(props) => props.$style?.borderWidth};
5454
border-color: ${(props) => props.$style?.border};
5555
border-style: ${(props) => props.$style?.borderStyle};
5656
padding: ${(props) => props.$style.padding};

client/packages/lowcoder/src/comps/comps/tabs/tabbedContainerComp.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ const getStyle = (
7676
return css`
7777
&.ant-tabs {
7878
overflow: hidden;
79-
border: ${style.borderWidth} solid ${style.border};
79+
border: ${style.borderWidth} ${style.borderStyle} ${style.border};
8080
border-radius: ${style.radius};
8181
padding: ${style.padding};
8282
background-color: ${style.background};
@@ -91,11 +91,13 @@ const getStyle = (
9191
.react-grid-layout {
9292
border-radius: 0;
9393
background-color: ${bodyStyle.background || 'transparent'};
94+
padding: ${bodyStyle.containerBodyPadding};
9495
}
9596
}
9697
9798
> .ant-tabs-nav {
9899
background-color: ${headerStyle.headerBackground || 'transparent'};
100+
padding: ${headerStyle.containerHeaderPadding};
99101
100102
.ant-tabs-tab {
101103
div {
@@ -108,6 +110,7 @@ const getStyle = (
108110
}
109111
110112
.ant-tabs-tab-btn {
113+
color: ${style.tabText} !important;
111114
font-size: ${style.textSize};
112115
font-family:${style.fontFamily};
113116
font-weight:${style.textWeight};

client/packages/lowcoder/src/comps/comps/triContainerComp/triContainer.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ const getStyle = (style: ContainerStyleType) => {
1313
border-color: ${style.border};
1414
border-width: ${style.borderWidth};
1515
border-radius: ${style.radius};
16+
border-style: ${style.borderStyle};
1617
overflow: hidden;
1718
padding: ${style.padding};
1819
${style.background && `background-color: ${style.background};`}

client/packages/lowcoder/src/comps/generators/uiCompBuilder.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -287,7 +287,11 @@ function UIView(props: {
287287
} else {
288288
return '0px'; // Both rotation and box-shadow are empty or restricted
289289
}
290-
} else if (rotationVal !== '' && rotationVal !== '0deg') {
290+
}else if (
291+
rotationVal === null ||
292+
rotationVal === undefined ||
293+
rotationVal === '0px'
294+
){return '0px'} else if (rotationVal !== '' && rotationVal !== '0deg') {
291295
// Rotation applied
292296
if (
293297
boxShadowVal === null ||

0 commit comments

Comments
 (0)