UNPKG

@skbkontur/db-viewer-ui

Version:

Database Viewer with custom configuration

15 lines 1.03 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.FormRow = FormRow; 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 renderEnvironment_1 = require("@skbkontur/react-ui/lib/renderEnvironment"); const react_1 = require("react"); const FormRow_styles_1 = require("./FormRow.styles"); function FormRow({ caption, captionWidth, children }) { const jsStyles = (0, renderEnvironment_1.useStyles)(FormRow_styles_1.getStyles); const theme = (0, react_1.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: jsStyles.caption(theme), width: captionWidth || 240, children: caption }), (0, jsx_runtime_1.jsx)(react_stack_layout_1.Fit, { children: children })] })); } //# sourceMappingURL=FormRow.js.map