From e300696792978a40b3db3ac2bcc48429a3b8345b Mon Sep 17 00:00:00 2001 From: Olof Bourghardt Date: Mon, 9 Aug 2021 08:47:47 +0200 Subject: [PATCH] Epxplore: use GrafanaTheme (SecondaryActions component) (#37543) --- public/app/features/explore/SecondaryActions.tsx | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/public/app/features/explore/SecondaryActions.tsx b/public/app/features/explore/SecondaryActions.tsx index 0984690349a..4f56f8c8b4e 100644 --- a/public/app/features/explore/SecondaryActions.tsx +++ b/public/app/features/explore/SecondaryActions.tsx @@ -1,7 +1,7 @@ import React from 'react'; import { css, cx } from '@emotion/css'; -import { GrafanaTheme } from '@grafana/data'; -import { stylesFactory, Button, HorizontalGroup, useTheme } from '@grafana/ui'; +import { GrafanaTheme2 } from '@grafana/data'; +import { Button, HorizontalGroup, useTheme2 } from '@grafana/ui'; type Props = { addQueryRowButtonDisabled?: boolean; @@ -14,15 +14,15 @@ type Props = { onClickQueryInspectorButton: () => void; }; -const getStyles = stylesFactory((theme: GrafanaTheme) => { +const getStyles = (theme: GrafanaTheme2) => { return { containerMargin: css` - margin-top: ${theme.spacing.md}; + margin-top: ${theme.spacing(2)}; `, }; -}); +}; export function SecondaryActions(props: Props) { - const theme = useTheme(); + const theme = useTheme2(); const styles = getStyles(theme); return (