UNPKG

@open-formulieren/formio-builder

Version:

An opinionated Formio webform builder for Open Forms

24 lines (23 loc) 642 B
import { jsx as o, jsxs as p } from "react/jsx-runtime"; import n from "clsx"; function b({ name: a, modes: r, currentMode: e, onToggle: s, className: c, btnClassName: i = "btn-secondary" }) { return /* @__PURE__ */ o("div", { className: n("btn-group", "btn-group-toggle", c), children: r.map(({ value: t, label: l }) => /* @__PURE__ */ p("label", { className: n("btn", "btn-sm", i, { active: t === e }), children: [ /* @__PURE__ */ o("input", { type: "radio", name: a, value: t, autoComplete: "off", checked: t === e, onChange: (m) => s(m.target.value) }), l ] }, t)) }); } export { b as default };