@konstructio/ui
Version:
A set of reusable and customizable React components built for konstruct.io
42 lines (41 loc) • 899 B
JavaScript
import { jsx as m } from "react/jsx-runtime";
import { cn as a } from "../../utils/index.js";
import { Card as h } from "../Card/Card.js";
import { Radio as l } from "../Radio/Radio.js";
import { radioCardVariants as n } from "./RadioCard.variants.js";
import { useTheme as f } from "../../contexts/theme.hook.js";
const N = ({
wrapperClassName: o,
theme: t,
labelWrapperClassName: i,
checked: r,
...s
}) => {
const { theme: p } = f(), e = t ?? p;
return /* @__PURE__ */ m(
h,
{
className: a(
n({
className: o,
theme: e
})
),
wrapperClassName: "w-max",
theme: e,
isActive: r,
children: /* @__PURE__ */ m(
l,
{
theme: e,
wrapperClassName: a("w-full h-full p-3 gap-3", i),
checked: r,
...s
}
)
}
);
};
export {
N as RadioCard
};