2022-05-31 07:43:23 -05:00
|
|
|
import { css } from '@emotion/css';
|
2022-04-22 08:33:13 -05:00
|
|
|
import React from 'react';
|
2022-04-13 10:17:07 -05:00
|
|
|
|
|
|
|
import { GrafanaTheme2 } from '@grafana/data/src';
|
2022-05-31 07:43:23 -05:00
|
|
|
import { useStyles2, PanelContainer } from '@grafana/ui';
|
2022-04-13 10:17:07 -05:00
|
|
|
|
|
|
|
export const NoData = () => {
|
|
|
|
const css = useStyles2(getStyles);
|
|
|
|
return (
|
|
|
|
<>
|
2022-05-31 07:43:23 -05:00
|
|
|
<PanelContainer data-testid="explore-no-data" className={css.wrapper}>
|
|
|
|
<span className={css.message}>{'No data'}</span>
|
|
|
|
</PanelContainer>
|
2022-04-13 10:17:07 -05:00
|
|
|
</>
|
|
|
|
);
|
|
|
|
};
|
|
|
|
|
|
|
|
const getStyles = (theme: GrafanaTheme2) => ({
|
2024-01-16 13:49:12 -06:00
|
|
|
wrapper: css({
|
|
|
|
label: 'no-data-card',
|
|
|
|
padding: theme.spacing(3),
|
|
|
|
background: theme.colors.background.primary,
|
|
|
|
borderRadius: theme.shape.radius.default,
|
|
|
|
display: 'flex',
|
|
|
|
flexDirection: 'column',
|
|
|
|
alignItems: 'center',
|
|
|
|
justifyContent: 'center',
|
|
|
|
flexGrow: 1,
|
|
|
|
}),
|
|
|
|
message: css({
|
|
|
|
fontSize: theme.typography.h2.fontSize,
|
|
|
|
padding: theme.spacing(4),
|
|
|
|
color: theme.colors.text.disabled,
|
|
|
|
}),
|
2022-04-13 10:17:07 -05:00
|
|
|
});
|