mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Alerting: Fix alert creation form layout when errors occur (#50084)
This commit is contained in:
parent
896a101f48
commit
51dcac4c34
@ -1,4 +1,5 @@
|
|||||||
import { css } from '@emotion/css';
|
import { css } from '@emotion/css';
|
||||||
|
import classNames from 'classnames';
|
||||||
import React, { FC } from 'react';
|
import React, { FC } from 'react';
|
||||||
import { useFormContext } from 'react-hook-form';
|
import { useFormContext } from 'react-hook-form';
|
||||||
|
|
||||||
@ -75,7 +76,7 @@ export const DetailsStep: FC = () => {
|
|||||||
dataSourceName && <GroupAndNamespaceFields rulesSourceName={dataSourceName} />}
|
dataSourceName && <GroupAndNamespaceFields rulesSourceName={dataSourceName} />}
|
||||||
|
|
||||||
{ruleFormType === RuleFormType.grafana && (
|
{ruleFormType === RuleFormType.grafana && (
|
||||||
<div className={styles.flexRow}>
|
<div className={classNames([styles.flexRow, styles.alignBaseline])}>
|
||||||
<Field
|
<Field
|
||||||
label={
|
label={
|
||||||
<Label htmlFor="folder" description={'Select a folder to store your rule.'}>
|
<Label htmlFor="folder" description={'Select a folder to store your rule.'}>
|
||||||
@ -137,6 +138,9 @@ export const DetailsStep: FC = () => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const getStyles = (theme: GrafanaTheme2) => ({
|
const getStyles = (theme: GrafanaTheme2) => ({
|
||||||
|
alignBaseline: css`
|
||||||
|
align-items: baseline;
|
||||||
|
`,
|
||||||
formInput: css`
|
formInput: css`
|
||||||
width: 330px;
|
width: 330px;
|
||||||
& + & {
|
& + & {
|
||||||
|
Loading…
Reference in New Issue
Block a user