forked from grafana.jool/grafana-jool
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
669 B
24 lines
669 B
import React, { PropsWithChildren, ReactElement } from 'react';
|
|
import { useStyles } from '@grafana/ui';
|
|
import { GrafanaTheme } from '@grafana/data';
|
|
import { css } from '@emotion/css';
|
|
|
|
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};
|
|
`,
|
|
};
|
|
}
|
|
|