Skip to content

Commit 35b6254

Browse files
authored
Merge pull request #32 from wwdd1/master
View.propTypes fix
2 parents 6785b3a + 8ec2eaf commit 35b6254

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

src/ButtonComponent.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
import React, { Component } from 'react';
22
import PropTypes from 'prop-types';
3-
import { StyleSheet, View, TouchableOpacity } from 'react-native';
3+
import { StyleSheet, View, TouchableOpacity, ViewPropTypes } from 'react-native';
44
import LinearGradient from 'react-native-linear-gradient';
55
import Button from './common/Button';
66

7+
const RNViewPropTypes = ViewPropTypes || View.propTypes;
8+
79
const propTypes = {
810
...Button.propTypes,
911
width: PropTypes.number,
@@ -19,7 +21,7 @@ const propTypes = {
1921
disabled: PropTypes.bool,
2022
backgroundColors: PropTypes.array,
2123
buttonStyle: PropTypes.any,
22-
style: PropTypes.any,
24+
style: RNViewPropTypes.style,
2325
progressSize: PropTypes.number,
2426
onPress: PropTypes.func,
2527

0 commit comments

Comments
 (0)