@massds/mayflower-react
Version:
React versions of Mayflower design system UI components
48 lines (47 loc) • 1.78 kB
TypeScript
/**
* InputRadioGroup module.
* @module @massds/mayflower-react/InputRadioGroup
* @requires module:@massds/mayflower-assets/scss/01-atoms/input-group
* @requires module:@massds/mayflower-assets/scss/input-radio-group
* @requires module:@massds/mayflower-assets/scss/01-atoms/input-radio
* @requires module:@massds/mayflower-assets/scss/01-atoms/error-msg
* @requires module:@massds/mayflower-assets/scss/01-atoms/svg-icons
* @requires module:@massds/mayflower-assets/scss/01-atoms/svg-loc-icons
*/
import React from 'react';
export interface InputRadioGroupProps {
/** The legend title of the radio button group. */
title: string;
/** The name of the radio button group */
name: string;
/** Whether radio input is required or not */
required?: boolean;
/** Whether you want the radio input outlined */
outline?: boolean;
/** The default select radio button option on initial render */
defaultSelected?: string;
/** Whether the radio group is in error state or not. */
error?: boolean;
/** Error Message content. */
errorMsg?: string;
/** Display Inputs inline */
inline?: boolean;
/** Whether the radio button group is in a disabled state or not */
disabled?: boolean;
/** On change callback function */
onChange?(...args: unknown[]): unknown;
/** An array of radio buttons. */
radioButtons?: {
id?: string;
value: string;
label: string;
/** Allow adding one class to radio button, e.g. "col-medium-1", "col-large-1" */
class?: string;
}[];
}
declare class InputRadioGroup extends React.Component<InputRadioGroupProps> {
constructor(props: any);
handleChange: (event: any) => void;
render(): any;
}
export default InputRadioGroup;