Skip to content

Commit 4230faf

Browse files
committed
Merge branch 'fix/theme-styling' of https://github.com/MenamAfzal/lowcoder into fix/theme-styling
2 parents 5a4e6b7 + 16cc3d4 commit 4230faf

File tree

3 files changed

+19
-15
lines changed

3 files changed

+19
-15
lines changed

client/packages/lowcoder/src/comps/comps/tableComp/tableCompView.tsx

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -67,13 +67,17 @@ const getStyle = (
6767
&,
6868
> td {
6969
background: ${genLinerGradient(rowStyle.background)};
70+
border-bottom:${rowStyle.borderWidth} ${rowStyle.borderStyle} ${rowStyle.border} !important;
71+
border-right:${rowStyle.borderWidth} ${rowStyle.borderStyle} ${rowStyle.border} !important;
7072
}
7173
}
7274
7375
> tr:nth-of-type(2n) {
7476
&,
7577
> td {
7678
background: ${alternateBackground};
79+
border-bottom:${rowStyle.borderWidth} ${rowStyle.borderStyle} ${rowStyle.border} !important;
80+
border-right:${rowStyle.borderWidth} ${rowStyle.borderStyle} ${rowStyle.border} !important;
7781
}
7882
}
7983
@@ -136,14 +140,15 @@ const BackgroundWrapper = styled.div<{
136140
$style: TableStyleType;
137141
$tableAutoHeight: boolean;
138142
}>`
139-
${(props) => !props.$tableAutoHeight && `height: calc(100% - ${props.$style.margin} - ${props.$style.margin});`}
140143
background: ${(props) => props.$style.background} !important;
141-
border: ${(props) => `${props.$style.borderWidth} solid ${props.$style.border} !important`};
144+
// border: ${(props) => `${props.$style.border} !important`};
142145
border-radius: ${(props) => props.$style.radius} !important;
143146
// padding: unset !important;
144-
padding: ${(props) => props.$style.padding} !important
147+
padding: ${(props) => props.$style.padding} !important;
145148
margin: ${(props) => props.$style.margin} !important;
146149
overflow: scroll !important;
150+
border-style:${(props) => props.$style.borderStyle} !important;
151+
border-width: ${(props) => `${props.$style.borderWidth} !important`};
147152
${(props) => props.$style}
148153
`;
149154

@@ -339,7 +344,6 @@ const TableTd = styled.td<{
339344
}
340345
background: ${(props) => props.$background} !important;
341346
border-color: ${(props) => props.$style.border} !important;
342-
border-width: ${(props) => props.$style.borderWidth} !important;
343347
border-radius: ${(props) => props.$style.radius};
344348
345349
padding: 0 !important;
@@ -533,7 +537,7 @@ function TableCellView(props: {
533537
text: columnStyle.text || columnsStyle.text,
534538
border: columnStyle.border || columnsStyle.border,
535539
radius: columnStyle.radius || columnsStyle.radius,
536-
borderWidth: columnStyle.borderWidth || columnsStyle.borderWidth,
540+
// borderWidth: columnStyle.borderWidth || columnsStyle.borderWidth,
537541
textSize: columnStyle.textSize || columnsStyle.textSize,
538542
textWeight: columnsStyle.textWeight || columnStyle.textWeight,
539543
fontFamily: columnsStyle.fontFamily || columnStyle.fontFamily,

client/packages/lowcoder/src/comps/comps/tableComp/tableTypes.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -205,12 +205,12 @@ const tableChildrenMap = {
205205
pagination: PaginationControl,
206206
sort: valueComp<Array<SortValue>>([]),
207207
toolbar: TableToolbarComp,
208-
style: styleControl(TableStyle),
209-
rowStyle: styleControl(TableRowStyle),
208+
style: withDefault(styleControl(TableStyle), {borderWidth: '1px'}),
209+
rowStyle: withDefault(styleControl(TableRowStyle),{ borderWidth: '1px'}),
210210
toolbarStyle: styleControl(TableToolbarStyle),
211-
headerStyle: styleControl(TableHeaderStyle),
211+
headerStyle:withDefault(styleControl(TableHeaderStyle), {borderWidth: '1px'}),
212212
searchText: StringControl,
213-
columnsStyle: withDefault(styleControl(TableColumnStyle), {borderWidth: '1px', radius: '0px',fontStyle:'italic'}),
213+
columnsStyle: styleControl(TableColumnStyle),
214214
viewModeResizable: BoolControl,
215215
visibleResizables: BoolControl,
216216
// sample data for regenerating columns

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1087,12 +1087,9 @@ const LinkTextStyle = [
10871087
export const TableStyle = [
10881088
MARGIN,
10891089
PADDING,
1090+
BORDER_STYLE,
1091+
BORDER_WIDTH,
10901092
...BG_STATIC_BORDER_RADIUS,
1091-
{
1092-
name: "borderWidth",
1093-
label: trans("style.borderWidth"),
1094-
borderWidth: "borderWidth",
1095-
},
10961093
] as const;
10971094

10981095
export const TableToolbarStyle = [
@@ -1141,6 +1138,9 @@ export const TableHeaderStyle = [
11411138
] as const;
11421139

11431140
export const TableRowStyle = [
1141+
BORDER_WIDTH,
1142+
BORDER_STYLE,
1143+
...BG_STATIC_BORDER_RADIUS,
11441144
getBackground(),
11451145
{
11461146
name: "selectedRowBackground",
@@ -1168,7 +1168,7 @@ export const TableColumnStyle = [
11681168
getStaticBackground("#00000000"),
11691169
getStaticBorder(),
11701170
MARGIN,
1171-
BORDER_WIDTH,
1171+
11721172
RADIUS,
11731173
TEXT,
11741174
TEXT_SIZE,

0 commit comments

Comments
 (0)