UNPKG

@up-group-ui/react-controls

Version:
20 lines 1.12 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.UpFormGroup = void 0; var tslib_1 = require("tslib"); var jsx_runtime_1 = require("react/jsx-runtime"); var theming_1 = (0, tslib_1.__importDefault)(require("../../../Common/theming")); var styles_1 = require("./styles"); var withTheme_1 = (0, tslib_1.__importDefault)(require("../../../Common/theming/withTheme")); var UpFormGroup = function (props) { var title = props.title, children = props.children, theme = props.theme, withTitleSeparator = props.withTitleSeparator, others = (0, tslib_1.__rest)(props, ["title", "children", "theme", "withTitleSeparator"]); return ((0, jsx_runtime_1.jsxs)("fieldset", (0, tslib_1.__assign)({ className: (0, styles_1.getStyles)(props) }, others, { children: [(0, jsx_runtime_1.jsx)("legend", { children: title }, void 0), children] }), void 0)); }; exports.UpFormGroup = UpFormGroup; UpFormGroup.defaultProps = { title: '', theme: theming_1.default, withTitleSeparator: false, }; exports.default = (0, withTheme_1.default)(UpFormGroup); //# sourceMappingURL=UpFormGroup.js.map