UNPKG

@carton-org/react-neumorphism

Version:

A React component library implementing the neumorphism design style

26 lines (25 loc) 837 B
import { jsx as e } from "@emotion/react/jsx-runtime"; import { withTheme as f } from "@emotion/react"; import m from "./Radio.js"; import { StyledRadioGroupContainer as b } from "./radioGroup.styles.js"; const G = ({ items: l, name: d, id: i, value: u, onChange: o, disabled: t, size: r = "sm", radioGroupContainerStyle: p, radioContainerStyle: s, radioLabelStyle: c, ...n }) => { const v = (a) => { o == null || o(a.target.value); }; return /* @__PURE__ */ e(b, { id: i, $size: r, $radioGroupContainerStyle: p, ...n, children: l.map((a) => /* @__PURE__ */ e(m, { inputSize: r, checked: u === a.value, id: a.id ?? a.value, name: d, value: a.value, onChange: v, label: a.label, disabled: a.disabled ?? t, radioContainerStyle: s, radioLabelStyle: c }, a.value)) }); }, x = f(G); export { x as default };