react-proforma
Version:
React Proforma helps you build simple to complex web forms with ease in React. -- Simplicity where you want it. Flexibility where you need it.
22 lines (21 loc) • 1.04 kB
TypeScript
import React from 'react';
import { IndexableObjectType } from './types';
interface IRadioProps {
name: string;
value: string;
component?: React.ComponentType<any>;
style?: {
[key: string]: string;
};
}
/**
* Component to produce a radio button form element, either with
* a standard input tag, or with your own custom component.
*
* @param {string} name - name of the form element, which MUST be the same string value as the corresponding value in your "initialValues" object.
* @param {string} value - the value to be assigned to this radio button. Note that radio buttons belonging to the same grouping should have the same "name" attribute, and then different "value" attributes for each.
* @param {React.ComponentType=} [component] - Optional custom component to be used instead of a standard input tag.
* @returns {JSX.Element} JSX.Element
*/
export declare const Radio: React.FunctionComponent<IRadioProps & IndexableObjectType & React.ComponentProps<'input'>>;
export {};