mirror of
https://github.com/apache/superset.git
synced 2026-05-12 19:35:17 +00:00
refactor: Bootstrap to AntD - Form - iteration 2 (#14379)
This commit is contained in:
committed by
GitHub
parent
fa510df624
commit
331310db9b
@@ -28,6 +28,7 @@ import './ColorSchemeControl.less';
|
||||
const propTypes = {
|
||||
description: PropTypes.string,
|
||||
label: PropTypes.string.isRequired,
|
||||
labelMargin: PropTypes.number,
|
||||
name: PropTypes.string.isRequired,
|
||||
onChange: PropTypes.func,
|
||||
value: PropTypes.string,
|
||||
@@ -92,7 +93,7 @@ export default class ColorSchemeControl extends React.PureComponent {
|
||||
}
|
||||
|
||||
render() {
|
||||
const { schemes, choices } = this.props;
|
||||
const { schemes, choices, labelMargin = 0 } = this.props;
|
||||
// save parsed schemes for later
|
||||
this.schemes = isFunction(schemes) ? schemes() : schemes;
|
||||
const options = (isFunction(choices) ? choices() : choices).map(
|
||||
@@ -118,7 +119,7 @@ export default class ColorSchemeControl extends React.PureComponent {
|
||||
return (
|
||||
<div>
|
||||
<ControlHeader {...this.props} />
|
||||
<Select {...selectProps} />
|
||||
<Select {...selectProps} css={{ marginTop: labelMargin }} />
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -25,7 +25,7 @@ import Button from 'src/components/Button';
|
||||
import { NativeSelect as Select } from 'src/components/Select';
|
||||
import { t, styled } from '@superset-ui/core';
|
||||
|
||||
import FormLabel from 'src/components/FormLabel';
|
||||
import { FormLabel } from 'src/components/Form';
|
||||
import { SQLEditor } from 'src/components/AsyncAceEditor';
|
||||
import sqlKeywords from 'src/SqlLab/utils/sqlKeywords';
|
||||
import { noOp } from 'src/utils/common';
|
||||
|
||||
@@ -22,7 +22,7 @@ import Popover from 'src/components/Popover';
|
||||
import { decimal2sexagesimal } from 'geolib';
|
||||
|
||||
import Label from 'src/components/Label';
|
||||
import FormLabel from 'src/components/FormLabel';
|
||||
import { FormLabel } from 'src/components/Form';
|
||||
import TextControl from './TextControl';
|
||||
import ControlHeader from '../ControlHeader';
|
||||
|
||||
|
||||
Reference in New Issue
Block a user