From da4fcaaef13fa775b2a257bfe0098b58cce6a5da Mon Sep 17 00:00:00 2001 From: Grace Guo Date: Thu, 24 Sep 2020 15:48:59 -0700 Subject: [PATCH] Revert "style: fix checkbox color (#10970)" This reverts commit 7ac02cf97451abbb90ef3a1c8d1d9287eb3d63b6. --- .../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 9dc24811f6b3..9a0740cb01a8 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(, { - wrappingComponent: ThemeProvider, - wrappingComponentProps: { theme: supersetTheme }, - }); + const fullComponent = mount(); 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 6bff6d8947f4..621ce1755c56 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 ( { onChange(!checked); diff --git a/superset-frontend/src/components/CheckboxIcons.tsx b/superset-frontend/src/components/CheckboxIcons.tsx index a9addf8159e5..2c94c863fb04 100644 --- a/superset-frontend/src/components/CheckboxIcons.tsx +++ b/superset-frontend/src/components/CheckboxIcons.tsx @@ -28,7 +28,7 @@ export const CheckboxChecked = () => ( > @@ -44,7 +44,7 @@ export const CheckboxHalfChecked = () => ( > @@ -60,7 +60,7 @@ export const CheckboxUnchecked = () => ( >