@rjsf/mui
Version:
Material UI 5 theme, fields and widgets for react-jsonschema-form
16 lines • 659 B
JavaScript
import { jsx as _jsx } from "react/jsx-runtime";
import { getTemplate } from '@rjsf/utils';
/** The `TextareaWidget` is a widget for rendering input fields as textarea.
*
* @param props - The `WidgetProps` for this component
*/
export default function TextareaWidget(props) {
const { options, registry } = props;
const BaseInputTemplate = getTemplate('BaseInputTemplate', registry, options);
let rows = 5;
if (typeof options.rows === 'string' || typeof options.rows === 'number') {
rows = options.rows;
}
return _jsx(BaseInputTemplate, { ...props, multiline: true, rows: rows });
}
//# sourceMappingURL=TextareaWidget.js.map