grafana/public/app/features/inspector/DetailText.tsx
Torkel Ödegaard 10badea19e
Emotion: Upgrades emotion from 10 to 11 and updates all import paths (#32541)
* Babel: Updates babel dependencies to latest version

* Emotion: Upgrade form 10 to 11

* Fixing tests

* Updated to use emotion/css instead in test
2021-04-01 14:15:23 +02:00

17 lines
502 B
TypeScript

import React, { FC } from 'react';
import { useStyles } from '@grafana/ui';
import { GrafanaTheme } from '@grafana/data';
import { css } from '@emotion/css';
const getStyles = (theme: GrafanaTheme) => css`
margin: 0;
margin-left: ${theme.spacing.md};
font-size: ${theme.typography.size.sm};
color: ${theme.colors.textWeak};
`;
export const DetailText: FC = ({ children }) => {
const collapsedTextStyles = useStyles(getStyles);
return <p className={collapsedTextStyles}>{children}</p>;
};