@open-formulieren/formio-builder
Version:
An opinionated Formio webform builder for Open Forms
14 lines (13 loc) • 1.02 kB
JavaScript
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const jsx_runtime_1 = require("react/jsx-runtime");
const react_intl_1 = require("react-intl");
const formio_1 = require("../../components/formio");
/**
* Show a formio cosignV1 component preview.
*/
const Preview = ({ component }) => {
const { label, key, description, authPlugin } = component;
return ((0, jsx_runtime_1.jsxs)(formio_1.Component, Object.assign({ type: component.type, field: key, htmlId: `editform-${key}`, label: label }, { children: [(0, jsx_runtime_1.jsx)("div", { children: (0, jsx_runtime_1.jsx)("button", Object.assign({ className: "btn btn-primary", type: "button" }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: 'Uu+81U', defaultMessage: [{ type: 0, value: "Cosign (" }, { type: 1, value: "authPlugin" }, { type: 0, value: ")" }], values: { authPlugin } }) })) }), description && (0, jsx_runtime_1.jsx)(formio_1.Description, { text: description })] })));
};
exports.default = Preview;