2022-01-31 14:57:14 +08:00
|
|
|
import { css } from '@emotion/css';
|
2022-04-22 21:33:13 +08:00
|
|
|
import React from 'react';
|
|
|
|
|
2022-01-31 14:57:14 +08:00
|
|
|
import { GrafanaTheme2 } from '@grafana/data';
|
2022-10-24 23:12:36 +08:00
|
|
|
import { Stack } from '@grafana/experimental';
|
|
|
|
import { useStyles2 } from '@grafana/ui';
|
2022-01-31 14:57:14 +08:00
|
|
|
|
|
|
|
interface Props {
|
|
|
|
children: React.ReactNode;
|
|
|
|
}
|
|
|
|
|
|
|
|
export function OperationsEditorRow({ children }: Props) {
|
|
|
|
const styles = useStyles2(getStyles);
|
|
|
|
|
|
|
|
return (
|
|
|
|
<div className={styles.root}>
|
|
|
|
<Stack gap={1}>{children}</Stack>
|
|
|
|
</div>
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
const getStyles = (theme: GrafanaTheme2) => {
|
|
|
|
return {
|
|
|
|
root: css({
|
|
|
|
padding: theme.spacing(1, 1, 0, 1),
|
|
|
|
backgroundColor: theme.colors.background.secondary,
|
2023-08-01 21:46:07 +08:00
|
|
|
borderRadius: theme.shape.radius.default,
|
2022-01-31 14:57:14 +08:00
|
|
|
}),
|
|
|
|
};
|
|
|
|
};
|