UNPKG

@grafana/ui

Version:
37 lines (32 loc) 1.21 kB
'use strict'; Object.defineProperty(exports, '__esModule', { value: true }); var jsxRuntime = require('react/jsx-runtime'); var css = require('@emotion/css'); var ThemeContext = require('../../themes/ThemeContext.cjs'); var InlineFieldRow = require('../Forms/InlineFieldRow.cjs'); var InlineLabel = require('../Forms/InlineLabel.cjs'); "use strict"; const SegmentSection = ({ label, htmlFor, children, fill }) => { const styles = ThemeContext.useStyles2(getStyles); return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: /* @__PURE__ */ jsxRuntime.jsxs(InlineFieldRow.InlineFieldRow, { children: [ /* @__PURE__ */ jsxRuntime.jsx(InlineLabel.InlineLabel, { htmlFor, width: 12, className: styles.label, children: label }), children, fill && /* @__PURE__ */ jsxRuntime.jsx("div", { className: styles.fill, children: /* @__PURE__ */ jsxRuntime.jsx(InlineLabel.InlineLabel, { children: "" }) }) ] }) }); }; const getStyles = (theme) => ({ label: css.css({ color: theme.colors.primary.text }), fill: css.css({ flexGrow: 1, marginBottom: theme.spacing(0.5) }) }); exports.SegmentSection = SegmentSection; //# sourceMappingURL=SegmentSection.cjs.map