legacy form migration

This commit is contained in:
Gareth Dawson
2023-11-14 15:41:36 +00:00
parent 17d71f6d9e
commit c9f515686c
6 changed files with 129 additions and 116 deletions

View File

@@ -1,13 +1,24 @@
import React from 'react';
import { InlineFieldRow } from '@grafana/ui';
import { InlineFieldRow, InlineFormLabel } from '@grafana/ui';
import { css } from '@emotion/css';
export const QueryEditorRow = ({ children }: React.PropsWithChildren<{}>) => {
const styles = getStyles();
return (
<InlineFieldRow>
{children}
<div className="gf-form gf-form--grow">
<div className="gf-form-label gf-form-label--grow" />
</div>
<InlineFormLabel className={styles.rowTerminator}>
<></>
</InlineFormLabel>
</InlineFieldRow>
);
};
const getStyles = () => {
return {
rowTerminator: css({
flexGrow: 1,
}),
};
};