UNPKG

stone-kit

Version:
46 lines (45 loc) 1.31 kB
import { jsxs as _, jsx as o } from "react/jsx-runtime"; import { Input as m } from "../Input/ui/Input.js"; import { c as h } from "../../index-rKuIKazb.js"; import { forwardRef as d } from "react"; import { NewIcon as i } from "../NewIcon/ui/NewIcon.js"; const k = "_checkboxLabel_8850s_1", T = "_labelText_8850s_36", p = "_labelTextModal_8850s_44", f = "_error_8850s_49", I = "_checkIcon_8850s_58", e = { checkboxLabel: k, labelText: T, labelTextModal: p, error: f, checkIcon: I }, s = h.bind(e), B = d( ({ text: c, isChecked: l, error: r, children: t, emitIsChecked: a, modalFontSize: n, ...b }, x) => /* @__PURE__ */ _("label", { className: s(e.checkboxLabel, { [e.error]: r }), children: [ /* @__PURE__ */ o( m, { type: "checkbox", ...b, onChange: () => a && a(!l), ref: x } ), l && /* @__PURE__ */ o( i, { additionalClass: e.checkIcon, color: "#B1B5C3", strokeWidth: "1.5", name: "check", size: "20" } ), /* @__PURE__ */ o( "div", { className: s(e.labelText, { [e.labelTextModal]: n }, { [e.error]: r }), dangerouslySetInnerHTML: c ? { __html: c } : void 0, children: t } ) ] }) ); export { B as CheckBoxNew };