From 65673857b657ca7f235da9a1384598351434b733 Mon Sep 17 00:00:00 2001 From: Uchechukwu Obasi Date: Fri, 30 Apr 2021 16:07:25 +0100 Subject: [PATCH] EmptySearchResult: updates component with the new theme model (#33573) --- .../EmptySearchResult/EmptySearchResult.tsx | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/packages/grafana-ui/src/components/EmptySearchResult/EmptySearchResult.tsx b/packages/grafana-ui/src/components/EmptySearchResult/EmptySearchResult.tsx index 31fef82b582..489feb368e8 100644 --- a/packages/grafana-ui/src/components/EmptySearchResult/EmptySearchResult.tsx +++ b/packages/grafana-ui/src/components/EmptySearchResult/EmptySearchResult.tsx @@ -1,26 +1,26 @@ import React, { FC } from 'react'; -import { GrafanaTheme } from '@grafana/data'; +import { GrafanaThemeV2 } from '@grafana/data'; import { css } from '@emotion/css'; -import { useStyles } from '../../themes'; +import { useStyles2 } from '../../themes'; export interface Props { children: JSX.Element | string; } const EmptySearchResult: FC = ({ children }) => { - const styles = useStyles(getStyles); + const styles = useStyles2(getStyles); return
{children}
; }; -const getStyles = (theme: GrafanaTheme) => { +const getStyles = (theme: GrafanaThemeV2) => { return { container: css` - border-left: 3px solid ${theme.palette.blue80}; - background-color: ${theme.colors.bg2}; - padding: ${theme.spacing.d}; + border-left: 3px solid ${theme.colors.info.main}; + background-color: ${theme.colors.background.secondary}; + padding: ${theme.spacing(2)}; min-width: 350px; - border-radius: ${theme.border.radius.md}; - margin-bottom: ${theme.spacing.xl}; + border-radius: ${theme.shape.borderRadius(2)}; + margin-bottom: ${theme.spacing(4)}; `, }; };