@lanaco/lnc-react-ui
Version:
React component library
40 lines (39 loc) • 1.11 kB
JavaScript
import { jsxs as h, jsx as a } from "react/jsx-runtime";
import { s as m } from "./emotion-styled.browser.esm-DfbrHHed.js";
import { d as s, c as i } from "./utils-BUdHa0nB.js";
import { u as p } from "./emotion-element-f0de968e.browser.esm-CkCiQliQ.js";
const y = m.label`
display: block;
margin-bottom: 4px;
${(e) => s(e.theme, "FormField", e.size, "enabled")}
color: ${(e) => i(e.theme, "FormField", "primary", "enabled", "label")};
`, F = m.span`
display: block;
margin-top: 8px;
${(e) => s(e.theme, "FormField", e.size, "enabled")}
color: ${(e) => i(
e.theme,
"FormField",
e.color,
"enabled",
"text"
)};
`, $ = (e) => {
const {
size: l = "small",
color: d = "primary",
className: n = "",
style: c = {},
text: o = "",
label: t = "",
children: b
} = e, r = p();
return /* @__PURE__ */ h("div", { style: c, className: "lnc-ui-form-field " + n, children: [
t && /* @__PURE__ */ a(y, { theme: r, size: l, children: t }),
b,
o && /* @__PURE__ */ a(F, { size: l, theme: r, color: d, children: o })
] });
};
export {
$ as default
};