mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
29 lines
654 B
TypeScript
29 lines
654 B
TypeScript
import { css } from '@emotion/css';
|
|
import { GrafanaTheme2 } from '@grafana/data';
|
|
import { stylesFactory, useTheme2 } from '@grafana/ui';
|
|
import React from 'react';
|
|
import Stack from './Stack';
|
|
|
|
interface EditorHeaderProps {}
|
|
|
|
const EditorHeader: React.FC<EditorHeaderProps> = ({ children }) => {
|
|
const theme = useTheme2();
|
|
const styles = getStyles(theme);
|
|
|
|
return (
|
|
<div className={styles.root}>
|
|
<Stack gap={3} alignItems="center">
|
|
{children}
|
|
</Stack>
|
|
</div>
|
|
);
|
|
};
|
|
|
|
export default EditorHeader;
|
|
|
|
const getStyles = stylesFactory((theme: GrafanaTheme2) => ({
|
|
root: css({
|
|
padding: theme.spacing(0, 1),
|
|
}),
|
|
}));
|