fix: bringing metric type icon styles into SelectControl (#14531)

This commit is contained in:
Evan Rusackas 2021-05-08 00:47:25 -07:00 committed by GitHub
parent 6871ad15f1
commit 4f000cc8d1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 12 additions and 2 deletions

View File

@ -18,7 +18,7 @@
*/
import React from 'react';
import PropTypes from 'prop-types';
import { t } from '@superset-ui/core';
import { t, css } from '@superset-ui/core';
import { Select, CreatableSelect, OnPasteSelect } from 'src/components/Select';
import ControlHeader from 'src/explore/components/ControlHeader';
@ -294,7 +294,17 @@ export default class SelectControl extends React.PureComponent {
}
return (
<div>
<div
css={theme => css`
.type-label {
margin-right: ${theme.gridUnit * 2}px;
width: ${theme.gridUnit * 7}px;
display: inline-block;
text-align: center;
font-weight: ${theme.typography.weights.bold};
}
`}
>
{this.props.showHeader && <ControlHeader {...this.props} />}
{isMulti ? (
<OnPasteSelect {...selectProps} selectWrap={SelectComponent} />