@indec/form-builder
Version:
Form builder
31 lines (30 loc) • 874 B
JavaScript
;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports["default"] = void 0;
var _jsxRuntime = require("react/jsx-runtime");
function Introduction(_ref) {
var introduction = _ref.introduction;
if (!introduction) {
return null;
}
var isHTML = /<[^>]+>/g.test(introduction);
if (isHTML) {
return /*#__PURE__*/(0, _jsxRuntime.jsx)("p", {
"data-testid": "introduction",
className: "fb:text-gray-600 fb:font-bold fb:whitespace-pre-line"
// eslint-disable-next-line react/no-danger
,
dangerouslySetInnerHTML: {
__html: introduction
}
});
}
return /*#__PURE__*/(0, _jsxRuntime.jsx)("p", {
"data-testid": "introduction",
className: "fb:text-gray-600 fb:font-bold fb:whitespace-pre-line",
children: introduction
});
}
var _default = exports["default"] = Introduction;