Skip to content

Commit 09a05ec

Browse files
authored
remove checkbox overlay (#404)
* remove checkbox overlay * v2.5.2
1 parent 2da51d7 commit 09a05ec

File tree

3 files changed

+11
-23
lines changed

3 files changed

+11
-23
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@netdata/netdata-ui",
3-
"version": "2.5.1",
3+
"version": "2.5.2",
44
"description": "netdata UI kit",
55
"main": "./lib/index.js",
66
"files": [

src/components/checkbox/checkbox.js

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,20 +3,12 @@ import { Text } from "src/components/typography"
33
import useCheckBoxStyles from "./use-styles-checkbox"
44
import useCheckbox from "./use-checkbox"
55

6-
import {
7-
CheckboxContainer,
8-
HiddenCheckboxInput,
9-
StyledCheckbox,
10-
StyledLabel,
11-
LabelText,
12-
StyledIcon,
13-
AccessibleArea,
14-
} from "./styled"
6+
import { CheckboxContainer, HiddenCheckboxInput, LabelText, StyledCheckbox, StyledIcon, StyledLabel } from "./styled"
157

168
export const Checkbox = forwardRef((
179
{
1810
checked,
19-
'data-testid': testId,
11+
"data-testid": testId,
2012
disabled,
2113
className,
2214
labelPosition,
@@ -39,8 +31,13 @@ export const Checkbox = forwardRef((
3931
})
4032

4133
return (
42-
<StyledLabel data-testid={testId} disabled={disabled} className={className} margin={margin} alignSelf={alignSelf}>
43-
<AccessibleArea />
34+
<StyledLabel
35+
data-testid={testId}
36+
disabled={disabled}
37+
className={className}
38+
margin={margin}
39+
alignSelf={alignSelf}
40+
>
4441
{label && labelPosition === "left" && (
4542
<LabelText as={Label} left>
4643
{label}

src/components/checkbox/styled.js

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
import styled from "styled-components"
22
import { Icon } from "src/components/icon"
3-
import { getValidatedControlColor, getColor, getSizeUnit } from "src/theme/utils"
3+
import { getSizeUnit, getValidatedControlColor } from "src/theme/utils"
44
import margin from "src/mixins/margin"
55
import alignSelf from "src/mixins/alignSelf"
6-
import { controlFocused } from "src/mixins"
76

87
import Flex from "src/components/templates/flex"
98

@@ -60,11 +59,3 @@ export const LabelText = styled.span`
6059
${({ right, ...props }) =>
6160
right ? `margin-left: ${getSizeUnit(props)}px;` : `margin-right: ${getSizeUnit(props)}px;`}
6261
`
63-
64-
export const AccessibleArea = styled.div`
65-
position: absolute;
66-
top: -5px;
67-
left: -5px;
68-
height: 30px;
69-
width: calc(100% + 10px);
70-
`

0 commit comments

Comments
 (0)