EmptyArea.tsx 555 B

12345678910111213141516171819202122
  1. import { css } from '@emotion/css';
  2. import React, { FC } from 'react';
  3. import { GrafanaTheme } from '@grafana/data';
  4. import { useStyles } from '@grafana/ui';
  5. export const EmptyArea: FC = ({ children }) => {
  6. const styles = useStyles(getStyles);
  7. return <div className={styles.container}>{children}</div>;
  8. };
  9. const getStyles = (theme: GrafanaTheme) => {
  10. return {
  11. container: css`
  12. background-color: ${theme.colors.bg2};
  13. color: ${theme.colors.textSemiWeak};
  14. padding: ${theme.spacing.xl};
  15. text-align: center;
  16. `,
  17. };
  18. };