UNPKG

@open-formulieren/formio-builder

Version:

An opinionated Formio webform builder for Open Forms

15 lines (14 loc) 1.01 kB
import { jsx as _jsx } from "react/jsx-runtime"; import { FormattedMessage, useIntl } from 'react-intl'; import { Checkbox } from '../formio'; const IsSensitiveData = ({ disabled = false }) => { const intl = useIntl(); const tooltip = intl.formatMessage({ id: "JDYF2q", defaultMessage: [{ type: 0, value: "The data entered in this component will be removed in accordance with the privacy settings." }] }); return (_jsx(Checkbox, { name: "isSensitiveData", label: _jsx(FormattedMessage, { id: 'm2oZCk', defaultMessage: [{ type: 0, value: "Is sensitive data" }] }), tooltip: tooltip, // Note that `disabled` results in this form field not being submitted at all in traditional // HTML forms. However, with Formik, the value is tracked in the React state and will // still be included. Normally we'd use the `readonly` attribute, but checkboxes don't // support this and require us to use `disabled`. disabled: disabled })); }; export default IsSensitiveData;