mirror of
https://github.com/grafana/grafana.git
synced 2025-02-15 01:53:33 -06:00
* Add and configure eslint-plugin-import * Fix the lint:ts npm command * Autofix + prettier all the files * Manually fix remaining files * Move jquery code in jest-setup to external file to safely reorder imports * Resolve issue caused by circular dependencies within Prometheus * Update .betterer.results * Fix missing // @ts-ignore * ignore iconBundle.ts * Fix missing // @ts-ignore
26 lines
670 B
TypeScript
26 lines
670 B
TypeScript
import { css } from '@emotion/css';
|
|
import React, { PropsWithChildren, ReactElement } from 'react';
|
|
|
|
import { GrafanaTheme } from '@grafana/data';
|
|
import { useStyles } from '@grafana/ui';
|
|
|
|
interface VariableSectionHeaderProps {
|
|
name: string;
|
|
}
|
|
|
|
export function VariableSectionHeader({ name }: PropsWithChildren<VariableSectionHeaderProps>): ReactElement {
|
|
const styles = useStyles(getStyles);
|
|
|
|
return <h5 className={styles.sectionHeading}>{name}</h5>;
|
|
}
|
|
|
|
function getStyles(theme: GrafanaTheme) {
|
|
return {
|
|
sectionHeading: css`
|
|
label: sectionHeading;
|
|
font-size: ${theme.typography.size.md};
|
|
margin-bottom: ${theme.spacing.sm};
|
|
`,
|
|
};
|
|
}
|