mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
EmptySearchResult: updates component with the new theme model (#33573)
This commit is contained in:
parent
aad772a7fc
commit
65673857b6
@ -1,26 +1,26 @@
|
|||||||
import React, { FC } from 'react';
|
import React, { FC } from 'react';
|
||||||
import { GrafanaTheme } from '@grafana/data';
|
import { GrafanaThemeV2 } from '@grafana/data';
|
||||||
import { css } from '@emotion/css';
|
import { css } from '@emotion/css';
|
||||||
import { useStyles } from '../../themes';
|
import { useStyles2 } from '../../themes';
|
||||||
|
|
||||||
export interface Props {
|
export interface Props {
|
||||||
children: JSX.Element | string;
|
children: JSX.Element | string;
|
||||||
}
|
}
|
||||||
|
|
||||||
const EmptySearchResult: FC<Props> = ({ children }) => {
|
const EmptySearchResult: FC<Props> = ({ children }) => {
|
||||||
const styles = useStyles(getStyles);
|
const styles = useStyles2(getStyles);
|
||||||
return <div className={styles.container}>{children}</div>;
|
return <div className={styles.container}>{children}</div>;
|
||||||
};
|
};
|
||||||
|
|
||||||
const getStyles = (theme: GrafanaTheme) => {
|
const getStyles = (theme: GrafanaThemeV2) => {
|
||||||
return {
|
return {
|
||||||
container: css`
|
container: css`
|
||||||
border-left: 3px solid ${theme.palette.blue80};
|
border-left: 3px solid ${theme.colors.info.main};
|
||||||
background-color: ${theme.colors.bg2};
|
background-color: ${theme.colors.background.secondary};
|
||||||
padding: ${theme.spacing.d};
|
padding: ${theme.spacing(2)};
|
||||||
min-width: 350px;
|
min-width: 350px;
|
||||||
border-radius: ${theme.border.radius.md};
|
border-radius: ${theme.shape.borderRadius(2)};
|
||||||
margin-bottom: ${theme.spacing.xl};
|
margin-bottom: ${theme.spacing(4)};
|
||||||
`,
|
`,
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user