chore: Removes direct theme imports (#19368)

This commit is contained in:
Michael S. Molina
2022-03-29 10:15:07 -03:00
committed by GitHub
parent d304849b46
commit 816a2c3e1e
11 changed files with 42 additions and 36 deletions

View File

@@ -19,7 +19,7 @@
*/
import React from 'react';
import PropTypes from 'prop-types';
import { t, styled, supersetTheme } from '@superset-ui/core';
import { t, styled, withTheme } from '@superset-ui/core';
import { getUrlParam } from 'src/utils/urlUtils';
import { AntdDropdown } from 'src/components';
@@ -183,7 +183,7 @@ class DatasourceControl extends React.PureComponent {
render() {
const { showChangeDatasourceModal, showEditDatasourceModal } = this.state;
const { datasource, onChange } = this.props;
const { datasource, onChange, theme } = this.props;
const isMissingDatasource = datasource.id == null;
let isMissingParams = false;
if (isMissingDatasource) {
@@ -235,7 +235,7 @@ class DatasourceControl extends React.PureComponent {
)}
{healthCheckMessage && (
<Tooltip title={healthCheckMessage}>
<Icons.AlertSolid iconColor={supersetTheme.colors.warning.base} />
<Icons.AlertSolid iconColor={theme.colors.warning.base} />
</Tooltip>
)}
{extra?.warning_markdown && (
@@ -325,4 +325,4 @@ class DatasourceControl extends React.PureComponent {
DatasourceControl.propTypes = propTypes;
DatasourceControl.defaultProps = defaultProps;
export default DatasourceControl;
export default withTheme(DatasourceControl);