This is an automated email from the ASF dual-hosted git repository. graceguo pushed a commit to branch revert-10970-checkbox_color in repository https://gitbox.apache.org/repos/asf/incubator-superset.git
commit c14a06db4185b9b043116708b649b0be2ad17a1f Author: Grace Guo <[email protected]> AuthorDate: Thu Sep 24 15:48:59 2020 -0700 Revert "style: fix checkbox color (#10970)" This reverts commit e4e78b66fa82acbe8e5bc425d697ff11b4a0cc3f. --- .../javascripts/explore/components/CheckboxControl_spec.jsx | 7 +------ superset-frontend/src/components/Checkbox/index.tsx | 11 ++--------- superset-frontend/src/components/CheckboxIcons.tsx | 6 +++--- 3 files changed, 6 insertions(+), 18 deletions(-) diff --git a/superset-frontend/spec/javascripts/explore/components/CheckboxControl_spec.jsx b/superset-frontend/spec/javascripts/explore/components/CheckboxControl_spec.jsx index 9dc2481..9a0740c 100644 --- a/superset-frontend/spec/javascripts/explore/components/CheckboxControl_spec.jsx +++ b/superset-frontend/spec/javascripts/explore/components/CheckboxControl_spec.jsx @@ -21,8 +21,6 @@ import React from 'react'; import sinon from 'sinon'; import { shallow, mount } from 'enzyme'; -import { supersetTheme, ThemeProvider } from '@superset-ui/core'; - import CheckboxControl from 'src/explore/components/controls/CheckboxControl'; import ControlHeader from 'src/explore/components/ControlHeader'; import Checkbox from 'src/components/Checkbox'; @@ -50,10 +48,7 @@ describe('CheckboxControl', () => { }); it('Checks the box when the label is clicked', () => { - const fullComponent = mount(<CheckboxControl {...defaultProps} />, { - wrappingComponent: ThemeProvider, - wrappingComponentProps: { theme: supersetTheme }, - }); + const fullComponent = mount(<CheckboxControl {...defaultProps} />); const spy = sinon.spy(fullComponent.instance(), 'onChange'); diff --git a/superset-frontend/src/components/Checkbox/index.tsx b/superset-frontend/src/components/Checkbox/index.tsx index 6bff6d8..621ce17 100644 --- a/superset-frontend/src/components/Checkbox/index.tsx +++ b/superset-frontend/src/components/Checkbox/index.tsx @@ -30,14 +30,8 @@ interface CheckboxProps { } const Styles = styled.span` - cursor: pointer; - &.primary { - color: ${({ theme }) => theme.colors.primary.base}; - } - &.grayscale { - color: ${({ theme }) => theme.colors.grayscale.light1}; - } - svg { + &, + & svg { vertical-align: top; } `; @@ -45,7 +39,6 @@ const Styles = styled.span` export default function Checkbox({ checked, onChange, style }: CheckboxProps) { return ( <Styles - className={checked ? 'primary' : 'grayscale'} style={style} onClick={() => { onChange(!checked); diff --git a/superset-frontend/src/components/CheckboxIcons.tsx b/superset-frontend/src/components/CheckboxIcons.tsx index a9addf8..2c94c86 100644 --- a/superset-frontend/src/components/CheckboxIcons.tsx +++ b/superset-frontend/src/components/CheckboxIcons.tsx @@ -28,7 +28,7 @@ export const CheckboxChecked = () => ( > <path d="M16 0H2C0.89 0 0 0.9 0 2V16C0 17.1 0.89 18 2 18H16C17.11 18 18 17.1 18 16V2C18 0.9 17.11 0 16 0Z" - fill="currentColor" + fill="#00A699" /> <path d="M7 14L2 9L3.41 7.59L7 11.17L14.59 3.58L16 5L7 14Z" fill="white" /> </svg> @@ -44,7 +44,7 @@ export const CheckboxHalfChecked = () => ( > <path d="M16 0H2C0.9 0 0 0.9 0 2V16C0 17.1 0.9 18 2 18H16C17.1 18 18 17.1 18 16V2C18 0.9 17.1 0 16 0Z" - fill="currentColor" + fill="#999999" /> <path d="M14 10H4V8H14V10Z" fill="white" /> </svg> @@ -60,7 +60,7 @@ export const CheckboxUnchecked = () => ( > <path d="M16 0H2C0.9 0 0 0.9 0 2V16C0 17.1 0.9 18 2 18H16C17.1 18 18 17.1 18 16V2C18 0.9 17.1 0 16 0Z" - fill="currentColor" + fill="#CCCCCC" /> <path d="M16 2V16H2V2H16V2Z" fill="white" /> </svg>
