@skbkontur/db-viewer-ui
Version:
Database Viewer with custom configuration
15 lines • 965 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.FormRow = void 0;
const tslib_1 = require("tslib");
const jsx_runtime_1 = require("react/jsx-runtime");
const react_stack_layout_1 = require("@skbkontur/react-stack-layout");
const react_ui_1 = require("@skbkontur/react-ui");
const react_1 = tslib_1.__importDefault(require("react"));
const FormRow_styles_1 = require("./FormRow.styles");
function FormRow({ caption, captionWidth, children }) {
const theme = react_1.default.useContext(react_ui_1.ThemeContext);
return ((0, jsx_runtime_1.jsxs)(react_stack_layout_1.RowStack, { gap: 2, children: [(0, jsx_runtime_1.jsx)(react_stack_layout_1.Fixed, { "data-tid": "FormCaption", className: FormRow_styles_1.jsStyles.caption(theme), width: captionWidth || 240, children: caption }), (0, jsx_runtime_1.jsx)(react_stack_layout_1.Fit, { children: children })] }));
}
exports.FormRow = FormRow;
//# sourceMappingURL=FormRow.js.map