@open-formulieren/formio-builder
Version:
An opinionated Formio webform builder for Open Forms
18 lines (17 loc) • 1.05 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
const jsx_runtime_1 = require("react/jsx-runtime");
const formio_1 = require("../../components/formio");
/**
* Show a formio textarea component preview.
*
* NOTE: for the time being, this is rendered in the default Formio bootstrap style,
* however at some point this should use the components of
* @open-formulieren/formio-renderer instead for a more accurate preview.
*/
const Preview = ({ component }) => {
const { key, label, description, placeholder, tooltip, validate = {}, autocomplete = '', disabled = false, multiple, showCharCount, rows, autoExpand = false, } = component;
const { required = false } = validate;
return ((0, jsx_runtime_1.jsx)(formio_1.TextArea, { name: key, multiple: !!multiple, label: label, description: description, tooltip: tooltip, placeholder: placeholder, required: required, autoComplete: autocomplete, readOnly: disabled, showCharCount: showCharCount, autoExpand: autoExpand, rows: rows }));
};
exports.default = Preview;