UNPKG

@mankindui/core

Version:

- a react component library - you can see how @mankindui/core can be used via examples: [usage examples](https://github.com/clarklindev/mankindui-test)

24 lines (23 loc) 1.44 kB
import { j as e } from "../../_virtual/jsx-runtime.js"; import "../index.js"; import { HiOutlineMinus as p, HiOutlinePlus as a } from "../../node_modules/react-icons/hi2/index.js"; import { Button as i } from "../Button/index.js"; import { Icon as r } from "../Icon/index.js"; import { Input as s } from "../Input/index.js"; const l = ({ savedData: t, onChange: o }) => { const c = (n) => { n.preventDefault(), n.stopPropagation(), console.log("decrement"), o(t - 1); }, m = (n) => { n.preventDefault(), n.stopPropagation(), console.log("increment"), o(t + 1); }; return /* @__PURE__ */ e.jsxs("div", { "data-component": l.displayName, className: "flex items-center gap-2.5", children: [ /* @__PURE__ */ e.jsx(i, { className: ["Button", "left"].join(" "), padding: "none", onClick: c, intent: "icon", children: /* @__PURE__ */ e.jsx(r, { size: "L", children: /* @__PURE__ */ e.jsx(p, {}) }) }), /* @__PURE__ */ e.jsx(s, { children: /* @__PURE__ */ e.jsx(s.InputElement, { className: "text-center w-10", placeholder: "", onChange: (n) => n.target.value, value: t.toString() }) }), /* @__PURE__ */ e.jsx(i, { className: ["Button", "right", "flex", "items-center"].join(" "), padding: "none", onClick: m, intent: "icon", children: /* @__PURE__ */ e.jsx(r, { size: "L", children: /* @__PURE__ */ e.jsx(a, {}) }) }) ] }); }; l.displayName = "Counter"; export { l as Counter }; //# sourceMappingURL=index.js.map