UNPKG

scrivito-pisasales-questionnaire-builder

Version:
24 lines (23 loc) 1.1 kB
import { jsx as e, jsxs as r, Fragment as a } from "react/jsx-runtime"; import { isInPlaceEditingActive as c, ContentTag as p } from "scrivito"; import { a as u, u as m, Q as l } from "./FormContext-CyyAThXO.js"; import { C as d } from "./scrivitoConfig-WST4rsmc.js"; import { u as g } from "./useDynamicBackground-BE1lGpvw.js"; const N = ({ widget: s }) => { const { getStepInfo: o } = u(), t = o(s.id()), n = c() && !t.isSingleStep, i = g(".step-preview-count"); return m() ? /* @__PURE__ */ r(a, { children: [ n && /* @__PURE__ */ e("span", { className: "step-preview-count", style: { backgroundColor: i || "transparent" }, children: "Step " + t.stepNumber }), /* @__PURE__ */ e( "div", { className: `step-container ${n ? "step-border" : t.isActive || t.isSingleStep ? "" : "hide"}`, "data-step-number": t.stepNumber, children: /* @__PURE__ */ e(p, { content: s, attribute: d }) } ) ] }) : /* @__PURE__ */ e(l, { status: "noFormContext" }); }; export { N as default }; //# sourceMappingURL=QuestionnaireStepWidgetContent-DDdm7xLE.js.map