@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)
65 lines (64 loc) • 1.71 kB
JavaScript
import { j as t } from "../../_virtual/jsx-runtime.js";
import "../index.js";
import { HiChevronDown as m } from "../../node_modules/react-icons/hi2/index.js";
import { Icon as d } from "../Icon/index.js";
const n = ({ children: e }) => /* @__PURE__ */ t.jsx(
"div",
{
"data-component": n.displayName,
className: `
relative
flex
flex-grow
rounded-md
w-full
items-center
min-h-12
h-[var(--input-height)]
border
border-gray-400/50
`,
children: e
}
), a = (e) => {
const { savedData: l, onChange: i, children: r } = e;
return /* @__PURE__ */ t.jsx(
"select",
{
className: `
appearance-none
rounded-md
box-border
m-0
w-full
h-full
outline-none
cursor-pointer
px-2
`,
value: l,
onChange: (o) => i(o),
children: r ? r.map((o) => o) : null
}
);
}, c = ({ children: e, value: l }) => /* @__PURE__ */ t.jsx(
"option",
{
className: `
dark:bg-black
dark:text-white`,
value: l,
children: e
}
), s = ({ children: e }) => /* @__PURE__ */ t.jsx("div", { className: "pointer-events-none absolute right-2", children: e || /* @__PURE__ */ t.jsx(d, { size: "M", children: /* @__PURE__ */ t.jsx(m, {}) }) });
n.SelectElement = a;
a.displayName = "Select.SelectElement";
n.SelectIcon = s;
s.displayName = "Select.SelectIcon";
n.SelectOption = c;
c.displayName = "Select.SelectOption";
n.displayName = "Select";
export {
n as Select
};
//# sourceMappingURL=index.js.map