Skip to content

Commit 8c7c873

Browse files
committed
Radio component styling added
1 parent cac08a4 commit 8c7c873

File tree

3 files changed

+30
-14
lines changed

3 files changed

+30
-14
lines changed

client/packages/lowcoder/src/comps/comps/selectInputComp/checkboxComp.tsx

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ export const getStyle = (style: CheckboxStyleType) => {
3838
.ant-checkbox-inner {
3939
background-color: ${style.checkedBackground};
4040
border-color: ${style.checkedBackground};
41+
border-width:${!!style.borderWidth ? style.borderWidth : '2px'};
4142
4243
&::after {
4344
border-color: ${style.checked};
@@ -46,6 +47,7 @@ export const getStyle = (style: CheckboxStyleType) => {
4647
4748
&::after {
4849
border-color: ${style.checkedBackground};
50+
border-width:${!!style.borderWidth ? style.borderWidth : '2px'};
4951
border-radius: ${style.radius};
5052
}
5153
}
@@ -54,15 +56,23 @@ export const getStyle = (style: CheckboxStyleType) => {
5456
border-radius: ${style.radius};
5557
background-color: ${style.uncheckedBackground};
5658
border-color: ${style.uncheckedBorder};
59+
border-width:${!!style.borderWidth ? style.borderWidth : '2px'};
5760
}
5861
5962
&:hover .ant-checkbox-inner,
6063
.ant-checkbox:hover .ant-checkbox-inner,
6164
.ant-checkbox-input:focus + .ant-checkbox-inner {
6265
border-color: ${style.checkedBackground};
66+
border-width:${!!style.borderWidth ? style.borderWidth : '2px'};
6367
}
6468
}
6569
70+
.ant-checkbox-group-item {
71+
font-family:${style.fontFamily};
72+
font-size:${style.textSize};
73+
font-weight:${style.textWeight};
74+
font-style:${style.fontStyle};
75+
}
6676
.ant-checkbox-wrapper {
6777
padding: ${style.padding};
6878
.ant-checkbox-inner,
@@ -73,7 +83,7 @@ export const getStyle = (style: CheckboxStyleType) => {
7383
`;
7484
};
7585

76-
const CheckboxGroup = styled(AntdCheckboxGroup)<{
86+
const CheckboxGroup = styled(AntdCheckboxGroup) <{
7787
$style: CheckboxStyleType;
7888
$layout: ValueFromOption<typeof RadioLayoutOptions>;
7989
}>`

client/packages/lowcoder/src/comps/comps/selectInputComp/radioComp.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,10 @@ const getStyle = (style: RadioStyleType) => {
2121
padding: ${style.padding};
2222
span:not(.ant-radio) {
2323
${EllipsisTextCss};
24+
font-family:${style.fontFamily};
25+
font-size:${style.textSize};
26+
font-weight:${style.textWeight};
27+
font-style:${style.fontStyle};
2428
}
2529
2630
.ant-radio-checked {
@@ -37,7 +41,7 @@ const getStyle = (style: RadioStyleType) => {
3741
.ant-radio-inner {
3842
background-color: ${style.uncheckedBackground};
3943
border-color: ${style.uncheckedBorder};
40-
44+
border-width:${style.borderWidth};
4145
&::after {
4246
background-color: ${style.checked};
4347
}

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

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -841,7 +841,8 @@ function checkAndUncheck() {
841841
}
842842

843843
export const CheckboxStyle = [
844-
LABEL,
844+
// LABEL,
845+
...replaceAndMergeMultipleStyles(STYLING_FIELDS_SEQUENCE, 'text', [LABEL, STATIC_TEXT, VALIDATE]).filter((style) => style.name !== 'border'),
845846
...checkAndUncheck(),
846847
{
847848
name: "checked",
@@ -850,15 +851,16 @@ export const CheckboxStyle = [
850851
depType: DEP_TYPE.CONTRAST_TEXT,
851852
transformer: contrastText,
852853
},
853-
RADIUS,
854-
STATIC_TEXT,
855-
VALIDATE,
856-
MARGIN,
857-
PADDING,
854+
// RADIUS,
855+
// STATIC_TEXT,
856+
// VALIDATE,
857+
// MARGIN,
858+
// PADDING,
858859
] as const;
859860

860861
export const RadioStyle = [
861-
LABEL,
862+
// LABEL,
863+
...replaceAndMergeMultipleStyles(STYLING_FIELDS_SEQUENCE, 'text', [LABEL, STATIC_TEXT, VALIDATE]).filter((style) => style.name !== 'border' && style.name !== 'radius'),
862864
...checkAndUncheck(),
863865
{
864866
name: "checked",
@@ -867,10 +869,10 @@ export const RadioStyle = [
867869
depType: DEP_TYPE.SELF,
868870
transformer: toSelf,
869871
},
870-
STATIC_TEXT,
871-
VALIDATE,
872-
MARGIN,
873-
PADDING,
872+
// STATIC_TEXT,
873+
// VALIDATE,
874+
// MARGIN,
875+
// PADDING,
874876
] as const;
875877

876878
export const SegmentStyle = [
@@ -1019,7 +1021,7 @@ export const TableColumnLinkStyle = [
10191021
export const FileStyle = [
10201022
// ...getStaticBgBorderRadiusByBg(SURFACE_COLOR),
10211023
getStaticBackground(SURFACE_COLOR),
1022-
...replaceAndMergeMultipleStyles(STYLING_FIELDS_SEQUENCE,'border',[getStaticBorder('#00000000')]),
1024+
...replaceAndMergeMultipleStyles(STYLING_FIELDS_SEQUENCE, 'border', [getStaticBorder('#00000000')]),
10231025
// TEXT, ACCENT, MARGIN, PADDING
10241026
] as const;
10251027

0 commit comments

Comments
 (0)