doj-react-adminlte
Version:
Simple and easy-to-use AdminLTE components for React
61 lines (56 loc) • 1.87 kB
TypeScript
import * as React from 'react';
export interface RadioGroupProps {
/**
* If true, interaction with the component is disabled
*/
disabled?: boolean;
/**
* If true, selects the first option by default upon loading of the list of options
*/
firstDefault?: boolean;
/**
* Set to true to make the list of options appear on the same line
*/
inline?: boolean;
/**
* Specifies the text to use as the label
*/
label?: React.ReactNode;
/**
* Property name of the items in the options list from which the option label to be displayed will be taken.
* Defaults to "label"
*/
labelKey?: string;
/**
* Specifies the name of the component. It is used to distinguish elements when
* a single form change handler is used
*/
name: string;
/**
* Callback fired when component value changes. Accepts a function with two parameters,
* namely field and value
*/
onChange?: (...args: any[])=>any;
/**
* Array of objects to be used as options. By default, uses the properties "label" and "value" for the labels and
* values of each of the options respectively.
*/
options: any[];
/**
* If set to true, only the value property of the selected option is passed as value parameter in the
* onChange handler. Otherwise, the option object itself is passed.
*/
simpleValue?: boolean;
/**
* Specifies the currently selected option
*/
value?: any;
/**
* Property name of the items in the options list from which the value of the option will be taken.
* Defaults to "value"
*/
valueKey?: string;
}
export default class RadioGroup extends React.Component<RadioGroupProps, any> {
render(): JSX.Element;
}