UNPKG

1.25 kBTypeScriptView Raw
1import React from 'react';
2import './style.scss';
3export interface RadioData {
4 label?: string | number | React.ReactNode;
5 value: string | number;
6 checked: boolean | undefined;
7}
8export declare type LayoutType = 'vertical' | 'horizontal';
9interface styledRadioProps {
10 label?: string | number | React.ReactNode;
11 value: string | number;
12 checked?: boolean;
13 children?: React.ReactText;
14 defaultChecked?: boolean;
15 disabled?: boolean;
16 onChange?: (data: RadioData, event: any) => void;
17 extralCls?: string;
18 minWidth?: string;
19 maxWidth?: string;
20 disableAnimation?: boolean;
21 extraCls?: string;
22 fontSize?: 'normal' | 'middle';
23 textColor?: 'M1' | 'M2' | 'M3' | 'M4' | 'M5';
24}
25interface radioState {
26 checked?: boolean;
27 radioClicked: boolean;
28}
29declare class Radio extends React.Component<styledRadioProps, radioState> {
30 constructor(props: any);
31 private txtRef;
32 radioOnclick: (e: any) => void;
33 isRadioControled: () => boolean;
34 getValue: () => RadioData;
35 syncClick: (e: any) => void;
36 isChecked: () => boolean | undefined;
37 isDisabled: () => boolean;
38 getMinWidth: () => string;
39 getMaxWidth: () => string;
40 render(): JSX.Element;
41}
42export default Radio;