import * as RadioGroup from "@radix-ui/react-radio-group"; import React from "react"; import { Label } from "../../components/form"; type SegmentProps = { label: string; children: React.ReactNode; } & RadioGroup.RadioGroupProps; export function Segment({ label, children, ...rest }: SegmentProps) { return (
{label && } {children}
); } type SegmentOptionProps = { value: string; children: React.ReactNode } & RadioGroup.RadioGroupItemProps; export function SegmentOption({ value, children, ...rest }: SegmentOptionProps) { return ( {children} ); }