@arolariu/components
Version:
🎨 70+ beautiful, accessible React components built on Base UI. TypeScript-first, CSS Modules styling, tree-shakeable, SSR-ready. Perfect for modern web apps, design systems & rapid prototyping. Zero config, maximum flexibility! ⚡
49 lines (48 loc) • 1.83 kB
JavaScript
"use client";
import { jsx } from "react/jsx-runtime";
import { mergeProps } from "@base-ui/react/merge-props";
import { Radio } from "@base-ui/react/radio";
import { RadioGroup } from "@base-ui/react/radio-group";
import { useRender } from "@base-ui/react/use-render";
import { Circle } from "lucide-react";
import { cn } from "../../lib/utilities.js";
import radio_group_module from "./radio-group.module.js";
import * as __rspack_external_react from "react";
const radio_group_RadioGroup = /*#__PURE__*/ __rspack_external_react.forwardRef((props, ref)=>{
const { className, render, ...otherProps } = props;
return /*#__PURE__*/ jsx(RadioGroup, {
ref: ref,
...otherProps,
render: useRender({
defaultTagName: "div",
render: render,
props: mergeProps({
className: cn(radio_group_module.group, className)
}, {})
})
});
});
const RadioGroupItem = /*#__PURE__*/ __rspack_external_react.forwardRef((props, ref)=>{
const { className, render, ...otherProps } = props;
return /*#__PURE__*/ jsx(Radio.Root, {
ref: ref,
...otherProps,
render: useRender({
defaultTagName: "button",
render: render,
props: mergeProps({
className: cn(radio_group_module.item, className)
}, {})
}),
children: /*#__PURE__*/ jsx(Radio.Indicator, {
className: radio_group_module.indicator,
children: /*#__PURE__*/ jsx(Circle, {
className: radio_group_module.icon
})
})
});
});
radio_group_RadioGroup.displayName = "RadioGroup";
RadioGroupItem.displayName = "RadioGroupItem";
export { RadioGroupItem, radio_group_RadioGroup as RadioGroup };
//# sourceMappingURL=radio-group.js.map