From 1e8fb8b55cb215681d35b1be6cf569c5c518c52c Mon Sep 17 00:00:00 2001 From: "Michael S. Molina" <70410625+michael-s-molina@users.noreply.github.com> Date: Fri, 25 Jun 2021 15:12:42 -0300 Subject: [PATCH] chore: Migrates ControlHeader icons (#15265) --- .../src/explore/components/ControlHeader.jsx | 25 +++++++++++++++---- 1 file changed, 20 insertions(+), 5 deletions(-) diff --git a/superset-frontend/src/explore/components/ControlHeader.jsx b/superset-frontend/src/explore/components/ControlHeader.jsx index c1b073459c..9a45917f6c 100644 --- a/superset-frontend/src/explore/components/ControlHeader.jsx +++ b/superset-frontend/src/explore/components/ControlHeader.jsx @@ -18,10 +18,11 @@ */ import React from 'react'; import PropTypes from 'prop-types'; -import { t, css } from '@superset-ui/core'; +import { t, css, withTheme } from '@superset-ui/core'; import { InfoTooltipWithTrigger } from '@superset-ui/chart-controls'; import { Tooltip } from 'src/components/Tooltip'; import { FormLabel } from 'src/components/Form'; +import Icons from 'src/components/Icons'; const propTypes = { name: PropTypes.string, @@ -45,7 +46,7 @@ const defaultProps = { name: undefined, }; -export default class ControlHeader extends React.Component { +class ControlHeader extends React.Component { renderOptionalIcons() { if (this.props.hovered) { return ( @@ -91,6 +92,9 @@ export default class ControlHeader extends React.Component { } const labelClass = this.props.validationErrors.length > 0 ? 'text-danger' : ''; + + const { theme } = this.props; + return (