UNPKG

@rjsf/react-bootstrap

Version:

React Bootstrap theme, fields and widgets for react-jsonschema-form, powered by react-bootstrap

14 lines 916 B
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime"; import { getUiOptions } from '@rjsf/utils'; import Row from 'react-bootstrap/Row'; import Col from 'react-bootstrap/Col'; import Container from 'react-bootstrap/Container'; export default function TitleField({ id, title, uiSchema, optionalDataControl, }) { const uiOptions = getUiOptions(uiSchema); let heading = _jsx("h5", { children: uiOptions.title || title }); if (optionalDataControl) { heading = (_jsx(Container, { fluid: true, className: 'p-0', children: _jsxs(Row, { children: [_jsx(Col, { xs: '11', children: heading }), _jsx(Col, { xs: '1', style: { marginLeft: '-5px' }, children: optionalDataControl })] }) })); } return (_jsxs("div", { id: id, className: 'my-1', children: [heading, _jsx("hr", { className: 'border-0 bg-secondary mt-0', style: { height: '1px' } })] })); } //# sourceMappingURL=TitleField.js.map