mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Epxplore: use GrafanaTheme (SecondaryActions component) (#37543)
This commit is contained in:
parent
ff1837a768
commit
e300696792
@ -1,7 +1,7 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { css, cx } from '@emotion/css';
|
import { css, cx } from '@emotion/css';
|
||||||
import { GrafanaTheme } from '@grafana/data';
|
import { GrafanaTheme2 } from '@grafana/data';
|
||||||
import { stylesFactory, Button, HorizontalGroup, useTheme } from '@grafana/ui';
|
import { Button, HorizontalGroup, useTheme2 } from '@grafana/ui';
|
||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
addQueryRowButtonDisabled?: boolean;
|
addQueryRowButtonDisabled?: boolean;
|
||||||
@ -14,15 +14,15 @@ type Props = {
|
|||||||
onClickQueryInspectorButton: () => void;
|
onClickQueryInspectorButton: () => void;
|
||||||
};
|
};
|
||||||
|
|
||||||
const getStyles = stylesFactory((theme: GrafanaTheme) => {
|
const getStyles = (theme: GrafanaTheme2) => {
|
||||||
return {
|
return {
|
||||||
containerMargin: css`
|
containerMargin: css`
|
||||||
margin-top: ${theme.spacing.md};
|
margin-top: ${theme.spacing(2)};
|
||||||
`,
|
`,
|
||||||
};
|
};
|
||||||
});
|
};
|
||||||
export function SecondaryActions(props: Props) {
|
export function SecondaryActions(props: Props) {
|
||||||
const theme = useTheme();
|
const theme = useTheme2();
|
||||||
const styles = getStyles(theme);
|
const styles = getStyles(theme);
|
||||||
return (
|
return (
|
||||||
<div className={styles.containerMargin}>
|
<div className={styles.containerMargin}>
|
||||||
|
Loading…
Reference in New Issue
Block a user