diff --git a/public/app/features/dashboard/components/TransformationsEditor/TransformationsEditor.tsx b/public/app/features/dashboard/components/TransformationsEditor/TransformationsEditor.tsx index 8a904936d86..8ac1b776bc7 100644 --- a/public/app/features/dashboard/components/TransformationsEditor/TransformationsEditor.tsx +++ b/public/app/features/dashboard/components/TransformationsEditor/TransformationsEditor.tsx @@ -1,4 +1,4 @@ -import { css } from '@emotion/css'; +import { cx, css } from '@emotion/css'; import React, { ChangeEvent } from 'react'; import { DragDropContext, Droppable, DropResult } from 'react-beautiful-dnd'; import { Unsubscribable } from 'rxjs'; @@ -270,26 +270,30 @@ class UnThemedTransformationsEditor extends React.PureComponent { - const { data, transformations } = this.state; + const styles = getStyles(config.theme2); + const { data, transformations, showPicker } = this.state; + const hide = config.featureToggles.transformationsRedesign && showPicker; return ( - - - {(provided) => { - return ( -
- - {provided.placeholder} -
- ); - }} -
-
+
+ + + {(provided) => { + return ( +
+ + {provided.placeholder} +
+ ); + }} +
+
+
); }; @@ -550,9 +554,7 @@ class UnThemedTransformationsEditor extends React.PureComponent )} - {hasTransforms && - (!config.featureToggles.transformationsRedesign || !this.state.showPicker) && - this.renderTransformationEditors()} + {hasTransforms && this.renderTransformationEditors()} {this.renderTransformsPicker()} @@ -587,6 +589,9 @@ function TransformationCard({ transform, onClick }: TransformationCardProps) { const getStyles = (theme: GrafanaTheme2) => { return { + hide: css` + display: none; + `, card: css` margin: 0; padding: ${theme.spacing(1)};