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)

66 lines (65 loc) 1.67 kB
import { j as r } from "../../_virtual/jsx-runtime.js"; import "../index.js"; import { Icon as c } from "../Icon/index.js"; const t = ({ checked: e, name: o, label: l, onChange: s, size: i = "XL", spacing: a = "2" }) => /* @__PURE__ */ r.jsxs( "label", { "data-component": t.name, className: ` flex flex-row items-center w-full h-full gap-${a} `, children: [ /* @__PURE__ */ r.jsx( "input", { type: "radio", checked: e, onChange: s, name: o, className: ` border-0 border-box clip-[rect(0 0 0 0)] clip-path-[inset(50%)] h-0 w-0 m-n1 hidden overflow-hidden p-0 absolute whitespace-nowrap ` } ), /* @__PURE__ */ r.jsx( "div", { className: ` flex items-center justify-items-center relative box-border cursor-pointer rounded-full border-[var(--border)] bg-gray-400/50 `, children: /* @__PURE__ */ r.jsx(c, { size: i, children: e ? /* @__PURE__ */ r.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", className: "text-black dark:text-white", fill: "currentColor", viewBox: "0 0 30 30", children: /* @__PURE__ */ r.jsx("circle", { cx: "15", cy: "15.5", r: "8", fill: "currentColor" }) }) : /* @__PURE__ */ r.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", className: "text-gray-500/80", fill: "currentColor", viewBox: "0 0 30 30", children: /* @__PURE__ */ r.jsx("circle", { cx: "15", cy: "15.5", r: "8", stroke: "var(--clr-foreground)", strokeWidth: 1 }) }) }) } ), l ] } ); t.displayName = "RadioButton"; export { t as RadioButton }; //# sourceMappingURL=index.js.map