mirror of
https://github.com/grafana/grafana.git
synced 2024-12-01 13:09:22 -06:00
10badea19e
* Babel: Updates babel dependencies to latest version * Emotion: Upgrade form 10 to 11 * Fixing tests * Updated to use emotion/css instead in test
17 lines
502 B
TypeScript
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>;
|
|
};
|