From 82428d32030a1315558c8601f7b88250de83ac81 Mon Sep 17 00:00:00 2001 From: Jacek Kolasa Date: Tue, 15 Nov 2022 14:17:49 +0100 Subject: [PATCH 1/2] remove checkbox overlay --- src/components/checkbox/checkbox.js | 21 +++++++++------------ src/components/checkbox/styled.js | 11 +---------- 2 files changed, 10 insertions(+), 22 deletions(-) diff --git a/src/components/checkbox/checkbox.js b/src/components/checkbox/checkbox.js index e40433093..c03b97036 100644 --- a/src/components/checkbox/checkbox.js +++ b/src/components/checkbox/checkbox.js @@ -3,20 +3,12 @@ import { Text } from "src/components/typography" import useCheckBoxStyles from "./use-styles-checkbox" import useCheckbox from "./use-checkbox" -import { - CheckboxContainer, - HiddenCheckboxInput, - StyledCheckbox, - StyledLabel, - LabelText, - StyledIcon, - AccessibleArea, -} from "./styled" +import { CheckboxContainer, HiddenCheckboxInput, LabelText, StyledCheckbox, StyledIcon, StyledLabel } from "./styled" export const Checkbox = forwardRef(( { checked, - 'data-testid': testId, + "data-testid": testId, disabled, className, labelPosition, @@ -39,8 +31,13 @@ export const Checkbox = forwardRef(( }) return ( - - + {label && labelPosition === "left" && ( {label} diff --git a/src/components/checkbox/styled.js b/src/components/checkbox/styled.js index 2df989774..9645ef11a 100644 --- a/src/components/checkbox/styled.js +++ b/src/components/checkbox/styled.js @@ -1,9 +1,8 @@ import styled from "styled-components" import { Icon } from "src/components/icon" -import { getValidatedControlColor, getColor, getSizeUnit } from "src/theme/utils" +import { getSizeUnit, getValidatedControlColor } from "src/theme/utils" import margin from "src/mixins/margin" import alignSelf from "src/mixins/alignSelf" -import { controlFocused } from "src/mixins" import Flex from "src/components/templates/flex" @@ -60,11 +59,3 @@ export const LabelText = styled.span` ${({ right, ...props }) => right ? `margin-left: ${getSizeUnit(props)}px;` : `margin-right: ${getSizeUnit(props)}px;`} ` - -export const AccessibleArea = styled.div` - position: absolute; - top: -5px; - left: -5px; - height: 30px; - width: calc(100% + 10px); -` From 6e079a5a80b50f49276201582616daec65256e06 Mon Sep 17 00:00:00 2001 From: Jacek Kolasa Date: Wed, 16 Nov 2022 11:10:32 +0100 Subject: [PATCH 2/2] v2.5.2 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index b1a510f58..0111e36ea 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@netdata/netdata-ui", - "version": "2.5.1", + "version": "2.5.2", "description": "netdata UI kit", "main": "./lib/index.js", "files": [