UNPKG

@stanfordspezi/spezi-web-design-system

Version:

Stanford Biodesign Digital Health Spezi Web Design System

28 lines (27 loc) 671 B
import { jsx as l } from "react/jsx-runtime"; import { b as c, R as p } from "./Radio-CzJvf9VA.mjs"; import { S as i } from "./SideLabel-BKQ9iBHW.mjs"; import { c as u } from "./index-2NvaPZWc.mjs"; const x = ({ options: o, onChange: e, className: r, direction: m = "column", ...s }) => /* @__PURE__ */ l( c, { "data-slot": "radio-group", className: u( "flex gap-x-4 gap-y-2", m === "column" ? "flex-col" : "flex-wrap", r ), onValueChange: (a) => e?.(a), ...s, children: o.map((a) => /* @__PURE__ */ l(i, { label: a.label, children: /* @__PURE__ */ l(p, { value: a.value }) }, a.value)) } ); export { x as R };