Skip to content

Commit

Permalink
Remove Control less (#19415)
Browse files Browse the repository at this point in the history
  • Loading branch information
geido authored Apr 5, 2022
1 parent e391a83 commit a59718b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 26 deletions.
21 changes: 0 additions & 21 deletions superset-frontend/src/explore/components/Control.less

This file was deleted.

12 changes: 7 additions & 5 deletions superset-frontend/src/explore/components/Control.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,11 @@ import {
ControlType,
ControlComponentProps as BaseControlComponentProps,
} from '@superset-ui/chart-controls';
import { JsonValue, QueryFormData } from '@superset-ui/core';
import { styled, JsonValue, QueryFormData } from '@superset-ui/core';
import ErrorBoundary from 'src/components/ErrorBoundary';
import { ExploreActions } from 'src/explore/actions/exploreActions';
import controlMap from './controls';

import './Control.less';

export type ControlProps = {
// the actual action dispatcher (via bindActionCreators) has identical
// signature to the original action factory.
Expand All @@ -52,6 +50,10 @@ export type ControlProps = {
export type ControlComponentProps<ValueType extends JsonValue = JsonValue> =
Omit<ControlProps, 'value'> & BaseControlComponentProps<ValueType>;

const StyledControl = styled.div`
padding-bottom: ${({ theme }) => theme.gridUnit}px;
`;

export default function Control(props: ControlProps) {
const {
actions: { setControlValue },
Expand All @@ -76,7 +78,7 @@ export default function Control(props: ControlProps) {
}

return (
<div
<StyledControl
className="Control"
data-test={name}
style={hidden ? { display: 'none' } : undefined}
Expand All @@ -86,6 +88,6 @@ export default function Control(props: ControlProps) {
<ErrorBoundary>
<ControlComponent onChange={onChange} hovered={hovered} {...props} />
</ErrorBoundary>
</div>
</StyledControl>
);
}

0 comments on commit a59718b

Please sign in to comment.