refactor: refactor Icon to Icons in sqlEditor component (#14463)

* add triangle-down

* lint fix

* add suggestions
This commit is contained in:
Phillip Kelley-Dotson 2021-06-16 13:14:36 -07:00 committed by GitHub
parent d625f5f111
commit ca89292faa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -24,7 +24,7 @@ import { connect } from 'react-redux';
import { bindActionCreators } from 'redux'; import { bindActionCreators } from 'redux';
import PropTypes from 'prop-types'; import PropTypes from 'prop-types';
import Split from 'react-split'; import Split from 'react-split';
import { t, styled, supersetTheme } from '@superset-ui/core'; import { t, styled, supersetTheme, withTheme } from '@superset-ui/core';
import debounce from 'lodash/debounce'; import debounce from 'lodash/debounce';
import throttle from 'lodash/throttle'; import throttle from 'lodash/throttle';
import StyledModal from 'src/components/Modal'; import StyledModal from 'src/components/Modal';
@ -38,7 +38,7 @@ import {
Switch, Switch,
Input, Input,
} from 'src/common/components'; } from 'src/common/components';
import Icon from 'src/components/Icon'; import Icons from 'src/components/Icons';
import { detectOS } from 'src/utils/common'; import { detectOS } from 'src/utils/common';
import { import {
addQueryEditor, addQueryEditor,
@ -564,7 +564,7 @@ class SqlEditor extends React.PureComponent {
this.props.database || {}; this.props.database || {};
const showMenu = allowCTAS || allowCVAS; const showMenu = allowCTAS || allowCVAS;
const { theme } = this.props;
const runMenuBtn = ( const runMenuBtn = (
<Menu> <Menu>
{allowCTAS && ( {allowCTAS && (
@ -639,7 +639,7 @@ class SqlEditor extends React.PureComponent {
this.props.defaultQueryLimit, this.props.defaultQueryLimit,
)} )}
</span> </span>
<Icon name="triangle-down" /> <Icons.TriangleDown iconColor={theme.colors.grayscale.base} />
</a> </a>
</Dropdown> </Dropdown>
</LimitSelectStyled> </LimitSelectStyled>
@ -667,7 +667,7 @@ class SqlEditor extends React.PureComponent {
<ShareSqlLabQuery queryEditor={qe} /> <ShareSqlLabQuery queryEditor={qe} />
</span> </span>
<Dropdown overlay={this.renderDropdown()} trigger="click"> <Dropdown overlay={this.renderDropdown()} trigger="click">
<Icon name="more-horiz" /> <Icons.MoreHoriz iconColor={theme.colors.grayscale.base} />
</Dropdown> </Dropdown>
</div> </div>
</StyledToolbar> </StyledToolbar>
@ -783,4 +783,5 @@ function mapDispatchToProps(dispatch) {
); );
} }
export default connect(mapStateToProps, mapDispatchToProps)(SqlEditor); const themedSqlEditor = withTheme(SqlEditor);
export default connect(mapStateToProps, mapDispatchToProps)(themedSqlEditor);