Skip to content

Commit 3cf9756

Browse files
author
FalkWolsky
committed
Fixing Checkbox Styles to show unchecked Border
1 parent 3112871 commit 3cf9756

File tree

2 files changed

+18
-8
lines changed

2 files changed

+18
-8
lines changed

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

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,20 @@ export const getStyle = (style: CheckboxStyleType) => {
3636
${EllipsisTextCss};
3737
}
3838
39+
.ant-checkbox .ant-checkbox-checked > .ant-checkbox-inner {
40+
border-color: ${style.checkedBorder};
41+
border-width:${!!style.borderWidth ? style.borderWidth : '2px'};
42+
}
43+
44+
.ant-checkbox:not(.ant-checkbox-checked) > .ant-checkbox-inner{
45+
border-color: ${style.uncheckedBorder};
46+
border-width:${!!style.borderWidth ? style.borderWidth : '2px'};
47+
}
48+
3949
.ant-checkbox-checked {
4050
.ant-checkbox-inner {
4151
background-color: ${style.checkedBackground};
42-
border-color: ${style.checkedBackground};
52+
border-color: ${style.checkedBorder};
4353
border-width:${!!style.borderWidth ? style.borderWidth : '2px'};
4454
4555
&::after {
@@ -48,17 +58,17 @@ export const getStyle = (style: CheckboxStyleType) => {
4858
}
4959
5060
&::after {
51-
border-color: ${style.checkedBackground};
61+
border-color: ${style.checkedBorder};
5262
border-width:${!!style.borderWidth ? style.borderWidth : '2px'};
5363
border-radius: ${style.radius};
5464
}
5565
}
5666
5767
.ant-checkbox-inner {
58-
border-radius: ${style.radius};
5968
background-color: ${style.uncheckedBackground};
60-
border-color: ${style.uncheckedBorder};
61-
border-width:${!!style.borderWidth ? style.borderWidth : '2px'};
69+
border-radius: ${style.radius};
70+
border-color: ${style.checkedBorder};
71+
border-width:${style.borderWidth ? style.borderWidth : '2px'};
6272
}
6373
6474
&:hover .ant-checkbox-inner,
@@ -76,7 +86,7 @@ export const getStyle = (style: CheckboxStyleType) => {
7686
&:hover .ant-checkbox-inner,
7787
.ant-checkbox:hover .ant-checkbox-inner,
7888
.ant-checkbox-input:focus + .ant-checkbox-inner {
79-
border-color: ${style.checkedBackground};
89+
border-color: ${style.checkedBorder};
8090
border-width:${!!style.borderWidth ? style.borderWidth : '2px'};
8191
}
8292
}

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1334,8 +1334,8 @@ export const RadioStyle = [
13341334
{
13351335
name: "checked",
13361336
label: trans("style.checked"),
1337-
depName: "uncheckedBackground",
1338-
depType: DEP_TYPE.SELF,
1337+
depName: "checkedBackground",
1338+
depType: DEP_TYPE.CONTRAST_TEXT,
13391339
transformer: toSelf,
13401340
},
13411341
HOVER_BACKGROUND_COLOR,

0 commit comments

Comments
 (0)