File tree Expand file tree Collapse file tree 3 files changed +10
-3
lines changed
generatedTypes/components/radioButton
src/components/radioButton Expand file tree Collapse file tree 3 files changed +10
-3
lines changed Original file line number Diff line number Diff line change 1
1
import React from 'react' ;
2
- import { TextStyle , ImageStyle } from 'react-native' ;
2
+ import { TextStyle , ImageSourcePropType , ImageStyle } from 'react-native' ;
3
3
interface RadioButtonPropTypes {
4
4
/**
5
5
* The identifier value of the radio button. must be different than other RadioButtons in the same group
@@ -40,7 +40,7 @@ interface RadioButtonPropTypes {
40
40
/**
41
41
* Icon image source
42
42
*/
43
- iconSource ?: object | number ;
43
+ iconSource ?: ImageSourcePropType ;
44
44
/**
45
45
* Icon image style
46
46
*/
Original file line number Diff line number Diff line change @@ -280,4 +280,4 @@ function createStyles(props: Props) {
280
280
} ) ;
281
281
}
282
282
283
- export default asRadioGroupChild ( asBaseComponent < RadioButtonPropTypes > ( forwardRef ( RadioButton ) ) ) ;
283
+ export default asBaseComponent < RadioButtonPropTypes > ( forwardRef ( asRadioGroupChild ( RadioButton ) ) ) ;
Original file line number Diff line number Diff line change 1
1
import React , { Component } from 'react' ;
2
+ // @ts -ignore
3
+ import hoistStatics from 'hoist-non-react-statics' ;
2
4
import RadioGroupContext from './RadioGroupContext' ;
3
5
4
6
interface RadioGroupChildPropTypes {
@@ -16,6 +18,8 @@ type PropTypes = RadioGroupChildPropTypes;
16
18
17
19
export default function asRadioGroupChild ( WrappedComponent : React . ComponentType < any > ) {
18
20
class RadioGroupChild extends Component < PropTypes > {
21
+ static displayName : string | undefined ;
22
+
19
23
render ( ) {
20
24
const { value : buttonValue , selected} = this . props ;
21
25
return (
@@ -33,5 +37,8 @@ export default function asRadioGroupChild(WrappedComponent: React.ComponentType<
33
37
}
34
38
}
35
39
40
+ hoistStatics ( RadioGroupChild , WrappedComponent ) ;
41
+ RadioGroupChild . displayName = WrappedComponent . displayName ;
42
+
36
43
return RadioGroupChild as any ;
37
44
}
You can’t perform that action at this time.
0 commit comments