UNPKG

@open-formulieren/formio-builder

Version:

An opinionated Formio webform builder for Open Forms

12 lines (11 loc) 852 B
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime"; import { FormattedMessage } from 'react-intl'; import { Component, Description } from '../../components/formio'; /** * Show a formio cosignV1 component preview. */ const Preview = ({ component }) => { const { label, key, description, authPlugin } = component; return (_jsxs(Component, Object.assign({ type: component.type, field: key, htmlId: `editform-${key}`, label: label }, { children: [_jsx("div", { children: _jsx("button", Object.assign({ className: "btn btn-primary", type: "button" }, { children: _jsx(FormattedMessage, { id: 'Uu+81U', defaultMessage: [{ type: 0, value: "Cosign (" }, { type: 1, value: "authPlugin" }, { type: 0, value: ")" }], values: { authPlugin } }) })) }), description && _jsx(Description, { text: description })] }))); }; export default Preview;