@kvaser/canking-api
Version:
CanKing API to communicate with the CanKing service using Node.js.
32 lines (31 loc) • 1.06 kB
TypeScript
/**
* This module includes a radio button group UI control.
*
* To be able to use these controls the CanKingDataProvider component must be present in the
* component tree above your component. Normally the CanKingDataProvider is added
* at the root of the component tree.
*
* @packageDocumentation
*/
import React, { JSX } from 'react';
/**
* Properties of the RadioGroupControl React component.
*/
export interface RadioGroupControlProps {
/** The component id. */
id?: string;
/** Value of the currently selected radio button in this group. */
value: string;
/**
* Callback that is called when a new radio button has been selected.
* @param value - The new value.
*/
onChange: (value: string) => void;
}
/**
* Creates a radio button group control.
* @param props - Component properties.
* @returns The RadioGroupControl React component.
*/
declare function RadioGroupControl({ children, id, value, onChange, }: React.PropsWithChildren<RadioGroupControlProps>): JSX.Element;
export default RadioGroupControl;