@coko/client
Version:
Client side common code for coko apps
38 lines (36 loc) • 991 B
JavaScript
import { grid as e } from "../../toolkit/themeHelper.js";
import "../../toolkit/index.js";
import "react";
import t from "styled-components";
import { jsx as n, jsxs as r } from "react/jsx-runtime";
import { InputNumber as i } from "antd";
//#region src/ui/common/InputNumber.tsx
var a = t.div`
cursor: ${(e) => e.$isDisabled ? "not-allowed" : "default"};
display: inline;
opacity: ${(e) => e.$isDisabled ? "0.5" : "1"};
label,
input {
cursor: ${(e) => e.$isDisabled ? "not-allowed" : "default"};
}
`, o = t.span`
margin-right: ${e(1)};
`, s = t(i)`
width: ${e(8)};
`, c = (e) => {
let { className: t, disabled: i = !1, label: c = null, name: l = "number-input", ...u } = e;
return /* @__PURE__ */ n(a, {
$isDisabled: i,
className: t,
children: /* @__PURE__ */ r("label", {
htmlFor: l,
children: [/* @__PURE__ */ n(o, { children: c }), /* @__PURE__ */ n(s, {
disabled: i,
name: l,
...u
})]
})
});
};
//#endregion
export { c as default };