DetailText.tsx 503 B

1234567891011121314151617
  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. const getStyles = (theme: GrafanaTheme) => css`
  6. margin: 0;
  7. margin-left: ${theme.spacing.md};
  8. font-size: ${theme.typography.size.sm};
  9. color: ${theme.colors.textWeak};
  10. `;
  11. export const DetailText: FC = ({ children }) => {
  12. const collapsedTextStyles = useStyles(getStyles);
  13. return <p className={collapsedTextStyles}>{children}</p>;
  14. };