mirror of
https://github.com/grafana/grafana.git
synced 2025-02-13 00:55:47 -06:00
* add navid and pagenav to edit/add/view alert rules * move ruleeditor smaller component to its own file * fix form alignments with new layout * fixed broken test * reuse AlertingPageWrapper
25 lines
643 B
TypeScript
25 lines
643 B
TypeScript
import { css } from '@emotion/css';
|
|
import React from 'react';
|
|
|
|
import { GrafanaTheme2 } from '@grafana/data';
|
|
import { Alert, LinkButton, useStyles2 } from '@grafana/ui';
|
|
|
|
interface AlertWarningProps {
|
|
title: string;
|
|
children: React.ReactNode;
|
|
}
|
|
export function AlertWarning({ title, children }: AlertWarningProps) {
|
|
return (
|
|
<Alert className={useStyles2(warningStyles).warning} severity="warning" title={title}>
|
|
<p>{children}</p>
|
|
<LinkButton href="alerting/list">To rule list</LinkButton>
|
|
</Alert>
|
|
);
|
|
}
|
|
|
|
const warningStyles = (theme: GrafanaTheme2) => ({
|
|
warning: css`
|
|
margin: ${theme.spacing(4)};
|
|
`,
|
|
});
|