@grafana/ui
Version:
Grafana Components Library
22 lines (19 loc) • 672 B
JavaScript
import { jsx } from 'react/jsx-runtime';
import { css, cx } from '@emotion/css';
import { useStyles2 } from '../../themes/ThemeContext.mjs';
;
const getLegendStyles = (theme) => {
return {
legend: css({
fontSize: theme.typography.h3.fontSize,
fontWeight: theme.typography.fontWeightRegular,
margin: theme.spacing(0, 0, 2, 0)
})
};
};
const Legend = ({ children, className, ...legendProps }) => {
const styles = useStyles2(getLegendStyles);
return /* @__PURE__ */ jsx("legend", { className: cx(styles.legend, className), ...legendProps, children });
};
export { Legend, getLegendStyles };
//# sourceMappingURL=Legend.mjs.map