@navinc/base-react-components
Version:
Nav's Pattern Library
17 lines (16 loc) • 1.03 kB
TypeScript
import { ReactNode } from 'react';
import * as RadioGroupPrimitive from '@radix-ui/react-radio-group';
import { InferComponentProps } from '../../types.js';
type BaseRadioProps = InferComponentProps<typeof RadioGroupPrimitive.Item>;
export declare const RadioGroupInternal: {
Root: import("react").ForwardRefExoticComponent<RadioGroupPrimitive.RadioGroupProps & import("react").RefAttributes<HTMLDivElement>>;
Radio: import("react").ForwardRefExoticComponent<BaseRadioProps & import("react").RefAttributes<HTMLButtonElement>>;
};
/** Contains all the parts of a radio group. */
export declare const RadioGroup: import("react").ForwardRefExoticComponent<RadioGroupPrimitive.RadioGroupProps & import("react").RefAttributes<HTMLDivElement>>;
export type RadioProps = {
label: string | ReactNode;
} & InferComponentProps<typeof RadioGroupInternal.Radio>;
/** Contains radio and label **/
export declare const Radio: ({ label, disabled, className, ...props }: RadioProps) => import("react/jsx-runtime").JSX.Element;
export {};