mirror of
https://github.com/apache/superset.git
synced 2026-04-19 08:04:53 +00:00
refactor: Removes hard coded colors (#11977)
* Removes hard coded colors Removes hard coded colors defined in src/components/styles.ts. The colors defined in this file were used only in the Select component so they were migrated to src/components/Select/styles.tsx and ajusted to conform to the theme colors. * Use theme context for Select styles * Includes Theme Provider in tests with Select
This commit is contained in:
committed by
GitHub
parent
9256b6fb3d
commit
3a6254184a
@@ -18,10 +18,9 @@
|
||||
*/
|
||||
/* eslint-disable no-unused-expressions */
|
||||
import React from 'react';
|
||||
import { mount } from 'enzyme';
|
||||
import { Select } from 'src/components/Select';
|
||||
import { getCategoricalSchemeRegistry } from '@superset-ui/core';
|
||||
|
||||
import { styledMount as mount } from 'spec/helpers/theming';
|
||||
import ColorSchemeControl from 'src/explore/components/controls/ColorSchemeControl';
|
||||
|
||||
const defaultProps = {
|
||||
|
||||
@@ -17,8 +17,8 @@
|
||||
* under the License.
|
||||
*/
|
||||
import React from 'react';
|
||||
import { shallow, mount } from 'enzyme';
|
||||
|
||||
import { shallow } from 'enzyme';
|
||||
import { styledMount as mount } from 'spec/helpers/theming';
|
||||
import FilterBox from 'src/visualizations/FilterBox/FilterBox';
|
||||
import SelectControl from 'src/explore/components/controls/SelectControl';
|
||||
|
||||
|
||||
@@ -19,10 +19,11 @@
|
||||
/* eslint-disable no-unused-expressions */
|
||||
import React from 'react';
|
||||
import sinon from 'sinon';
|
||||
import { shallow, mount } from 'enzyme';
|
||||
import { shallow } from 'enzyme';
|
||||
import { Select, CreatableSelect } from 'src/components/Select';
|
||||
import OnPasteSelect from 'src/components/Select/OnPasteSelect';
|
||||
import SelectControl from 'src/explore/components/controls/SelectControl';
|
||||
import { styledMount as mount } from 'spec/helpers/theming';
|
||||
|
||||
const defaultProps = {
|
||||
choices: [
|
||||
|
||||
@@ -17,7 +17,8 @@
|
||||
* under the License.
|
||||
*/
|
||||
import React from 'react';
|
||||
import { mount, ReactWrapper } from 'enzyme';
|
||||
import { ReactWrapper } from 'enzyme';
|
||||
import { styledMount as mount } from 'spec/helpers/theming';
|
||||
import { act } from 'react-dom/test-utils';
|
||||
|
||||
import MetricsControl from 'src/explore/components/controls/MetricsControl';
|
||||
|
||||
Reference in New Issue
Block a user