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-YnD2EP-S.js"; import { forwardRef as p } from "react"; import { NewIcon as d } from "../NewIcon/ui/NewIcon.js"; const i = "_checkboxLabel_14vcp_1", k = "_labelText_14vcp_36", T = "_labelTextModal_14vcp_44", f = "_error_14vcp_49", v = "_checkIcon_14vcp_58", e = { checkboxLabel: i, labelText: k, labelTextModal: T, error: f, checkIcon: v }, t = h.bind(e), w = p( ({ text: c, isChecked: l, error: r, children: n, emitIsChecked: a, modalFontSize: s, ...b }, x) => /* @__PURE__ */ _("label", { className: t(e.checkboxLabel, { [e.error]: r }), children: [ /* @__PURE__ */ o( m, { type: "checkbox", ...b, onChange: () => a && a(!l), ref: x } ), l && /* @__PURE__ */ o( d, { additionalClass: e.checkIcon, color: "#B1B5C3", strokeWidth: "1.5", name: "check", size: "20" } ), /* @__PURE__ */ o( "div", { className: t(e.labelText, { [e.labelTextModal]: s }, { [e.error]: r }), dangerouslySetInnerHTML: c ? { __html: c } : void 0, children: n } ) ] }) ); export { w as CheckBoxNew };