Skip to content

Commit b9a54ac

Browse files
committed
increased size of Radio and Checkbox inputs
1 parent 400070c commit b9a54ac

File tree

2 files changed

+12
-10
lines changed

2 files changed

+12
-10
lines changed

src/components/Checkbox/Checkbox.js

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,11 @@ import { createDisabledTextStyles, createFlatBoxStyles } from "../common";
77
import { padding, fontSizes } from "../common/system";
88
import Cutout from "../Cutout/Cutout";
99

10+
const checkboxSize = "22px";
1011
const StyledLabel = styled.label`
1112
display: inline-block;
1213
position: relative;
13-
padding-left: calc(20px + ${padding.sm});
14+
padding-left: calc(${checkboxSize} + ${padding.sm});
1415
margin: ${padding.sm} 0;
1516
cursor: pointer;
1617
-webkit-user-select: none;
@@ -37,8 +38,8 @@ const createCheckmarkSymbol = ({ checked }) =>
3738
position: absolute;
3839
left: 50%;
3940
top: calc(50% - 1px);
40-
width: 3px;
41-
height: 7px;
41+
width: 4px;
42+
height: 8px;
4243
4344
border: solid ${({ theme }) => theme.checkmark};
4445
border-width: 0 3px 3px 0;
@@ -50,8 +51,8 @@ const sharedCheckmarkStyles = css`
5051
top: 50%;
5152
left: 0;
5253
transform: translateY(-50%);
53-
width: 20px;
54-
height: 20px;
54+
width: ${checkboxSize};
55+
height: ${checkboxSize};
5556
${props => createCheckmarkSymbol(props)}
5657
`;
5758
const StyledCheckmark = styled(Cutout)`

src/components/Radio/Radio.js

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,12 @@ import { createDisabledTextStyles, createFlatBoxStyles } from "../common";
66
import { padding, fontSizes } from "../common/system";
77
import Cutout from "../Cutout/Cutout";
88

9+
const radioSize = "22px";
910
const StyledLabel = styled.label`
1011
display: inline-block;
1112
1213
position: relative;
13-
padding-left: calc(20px + ${padding.sm});
14+
padding-left: calc(${radioSize} + ${padding.sm});
1415
margin: ${padding.sm} 0;
1516
cursor: pointer;
1617
-webkit-user-select: none;
@@ -36,8 +37,8 @@ const createCheckmarkSymbol = ({ checked }) =>
3637
display: inline-block;
3738
top: 50%;
3839
left: 50%;
39-
width: 6px;
40-
height: 6px;
40+
width: 7px;
41+
height: 7px;
4142
transform: translate(-50%, -50%);
4243
border-radius: 50%;
4344
background: ${({ theme }) => theme.checkmark};
@@ -49,8 +50,8 @@ const sharedCheckmarkStyles = css`
4950
top: 50%;
5051
left: 0;
5152
transform: translateY(-50%);
52-
width: 20px;
53-
height: 20px;
53+
width: ${radioSize};
54+
height: ${radioSize};
5455
border-radius: 50%;
5556
${props => createCheckmarkSymbol(props)}
5657
`;

0 commit comments

Comments
 (0)