import * as React from 'react';
import type { BackyardBaseProps } from '../utils/typings/BackyardProps';
import type { BDSForwardRef } from '../utils/typings/BDSComponentProps';
/**
* Backyard React Radio
*
* Radio for interacting with selections in a form.
*
* > Note: `name` is required when not a child of `RadioGroup` with a name
*
*
*
* To give `Radio` a label, use `FormControlLabel`, similar to `Checkbox` and `Switch`:
*
* }
* label="Label"
* />
*
* To give `Radio` helper text, use `FormHelperText` inside a `FormControl`:
*
* > Note: When grouping `Radio`s together, use the `RadioGroup` to sync multiple
* > radios together with one `name`, one `onChange`, and even set a `defaultValue`.
*
*
* What color was Gandalf's robes in LotR?
*
* }
* label="White"
* />
* }
* label="Gray"
* />
* }
* label="Both"
* />
*
* Select the right answer
*
*/
declare const Radio: BDSForwardRef;
declare type RadioRef = HTMLInputElement;
interface RadioProps extends BackyardBaseProps {
/**
* Customize a label for the radio input
*/
children?: React.ReactNode;
/**
* Whether or not `Radio` is checked
* Use for a controlled component
*/
checked?: boolean;
/**
* Whether or not the radio is checked by default
* Use for an uncontrolled component
*/
defaultChecked?: boolean;
/**
* Whether or not `Radio` is disabled
*/
disabled?: boolean;
/**
* DOM Class Name
*/
className?: string;
/**
* DOM ID of `input`
*/
id?: string;
/**
* DOM Name of `input`
* Note: Required when NOT a child of `RadioGroup`
*/
name?: string;
/**
* `onChange` function triggered when value of `input` changes
* Chained through `RadioGroup` parent if present
*/
onChange?: (event: React.FormEvent) => void;
/**
* Value of `input`
*/
value?: string;
/**
* Props to apply to wrapper
* Useful for setting style of wrapper instead of `input`
*/
wrapperProps?: BackyardBaseProps;
}
export { Radio };
export type { RadioProps, RadioRef };
export default Radio;