lune-ui-lib
Version:
Lune UI Components Library
24 lines (23 loc) • 952 B
TypeScript
import React, { FC } from 'react';
export interface RadioButtonGroupProps {
defaultValue: any;
value: any;
name: string;
onChange: (event: React.ChangeEvent<HTMLInputElement>, value: string) => void;
items: RadioButtonProps[];
}
export interface RadioButtonProps {
label: React.ReactNode;
value: any;
disabled?: boolean;
}
/**
* Controlled Radio button group component
* @param defaultValue - The default/initial value. Use when the component is not controlled.
* @param value - Value of the selected radio button. The DOM API casts this to a string.
* @param name - The name used to reference the value of the control
* @param onChange - Callback fired when a radio button is selected.
* @param items - Radio buttons containing a value, and a label that can be a string, Text, Textarea, Input, or any other ReactNode
*/
declare const RadioButtonGroup: FC<RadioButtonGroupProps>;
export default RadioButtonGroup;