Skip to content

Commit 0771f2c

Browse files
authored
Feat/RadioButton - value type update (#790)
* Updating value type * Updating initialValue type * Updating value type * Updating value type * Updating value type * Updating value type * Updating value type
1 parent 52f3b75 commit 0771f2c

File tree

7 files changed

+9
-9
lines changed

7 files changed

+9
-9
lines changed

generatedTypes/components/radioButton/RadioButton.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ interface RadioButtonPropTypes {
44
/**
55
* The identifier value of the radio button. must be different than other RadioButtons in the same group
66
*/
7-
value?: string | boolean;
7+
value?: string | number | boolean;
88
/**
99
* When using RadioButton without a RadioGroup, use this prop to toggle selection
1010
*/

generatedTypes/components/radioButton/RadioGroup.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ interface RadioGroupPropTypes {
33
/**
44
* The initial value of the selected radio button
55
*/
6-
initialValue?: string | boolean;
6+
initialValue?: string | number | boolean;
77
/**
88
* Invoked once when value changes, by selecting one of the radio buttons in the group
99
*/

generatedTypes/components/radioButton/RadioGroupContext.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ export interface RadioGroupContextPropTypes {
33
/**
44
* The identifier value of the radio button. must be different than other RadioButtons in the same group
55
*/
6-
value?: string | boolean;
6+
value?: string | number | boolean;
77
/**
88
* Invoked once when value changes, by selecting one of the radio buttons in the group
99
*/

src/components/radioButton/RadioButton.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ interface RadioButtonPropTypes {
2727
/**
2828
* The identifier value of the radio button. must be different than other RadioButtons in the same group
2929
*/
30-
value?: string | boolean;
30+
value?: string | number | boolean;
3131
/**
3232
* When using RadioButton without a RadioGroup, use this prop to toggle selection
3333
*/

src/components/radioButton/RadioGroup.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,15 @@ interface RadioGroupPropTypes {
88
/**
99
* The initial value of the selected radio button
1010
*/
11-
initialValue?: string | boolean;
11+
initialValue?: string | number | boolean;
1212
/**
1313
* Invoked once when value changes, by selecting one of the radio buttons in the group
1414
*/
1515
onValueChange?: Function;
1616
}
1717

1818
interface RadioGroupState {
19-
value?: string | boolean;
19+
value?: RadioGroupPropTypes['initialValue'];
2020
}
2121

2222
type Props = RadioGroupPropTypes & BaseComponentInjectedProps & ForwardRefInjectedProps;

src/components/radioButton/RadioGroupContext.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ export interface RadioGroupContextPropTypes {
44
/**
55
* The identifier value of the radio button. must be different than other RadioButtons in the same group
66
*/
7-
value?: string | boolean;
7+
value?: string | number | boolean;
88
/**
99
* Invoked once when value changes, by selecting one of the radio buttons in the group
1010
*/

src/components/radioButton/asRadioGroupChild.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ interface RadioGroupChildPropTypes {
77
/**
88
* The identifier value of the radio button. must be different than other RadioButtons in the same group
99
*/
10-
value?: string | boolean;
10+
value?: string | number | boolean;
1111
/**
1212
* When using RadioButton without a RadioGroup, use this prop to toggle selection
1313
*/
@@ -19,7 +19,7 @@ type PropTypes = RadioGroupChildPropTypes;
1919
export default function asRadioGroupChild(WrappedComponent: React.ComponentType<any>) {
2020
class RadioGroupChild extends Component<PropTypes> {
2121
static displayName: string | undefined;
22-
22+
2323
render() {
2424
const {value: buttonValue, selected} = this.props;
2525
return (

0 commit comments

Comments
 (0)