Skip to content

Commit a09b5ad

Browse files
authored
Fix RadioButton typings to extend our ViewProps (#2846)
1 parent ab693db commit a09b5ad

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/components/radioButton/index.tsx

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,12 @@ import {
77
StyleProp,
88
ImageSourcePropType,
99
ImageStyle,
10-
ViewStyle,
11-
ViewProps
10+
ViewStyle
1211
} from 'react-native';
1312
import {Colors} from '../../style';
1413
import {asBaseComponent, forwardRef, BaseComponentInjectedProps, ForwardRefInjectedProps} from '../../commons/new';
1514
import TouchableOpacity from '../touchableOpacity';
16-
import View from '../view';
15+
import View, {ViewProps} from '../view';
1716
import Text from '../text';
1817
import Image from '../image';
1918
import asRadioGroupChild from '../radioGroup/asRadioGroupChild';
@@ -187,7 +186,7 @@ class RadioButton extends PureComponent<Props, RadioButtonState> {
187186

188187
getRadioButtonOutlineStyle() {
189188
const {color, size, borderRadius, style: propsStyle, disabled} = this.props;
190-
const style = [this.styles.radioButtonOutline];
189+
const style: ViewProps['style'][] = [this.styles.radioButtonOutline];
191190

192191
if (size) {
193192
style.push({width: size, height: size});

0 commit comments

Comments
 (0)