Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 14 additions & 13 deletions Button.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import {
TouchableHighlight,
View,
} from 'react-native';
import PropTypes from 'prop-types'

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would you mind adding a ; at the end to keep up with the linting rules please?


const colors = {
defaultBorderColor: "#3B373C",
Expand Down Expand Up @@ -33,20 +34,20 @@ const styles = StyleSheet.create({

export default class Button extends Component {
static propTypes = {
backgroundColor: React.PropTypes.string,
children: React.PropTypes.oneOfType([
React.PropTypes.arrayOf(React.PropTypes.node),
React.PropTypes.node,
backgroundColor: PropTypes.string,
children: PropTypes.oneOfType([
PropTypes.arrayOf(PropTypes.node),
PropTypes.node,
]),
containerStyle: View.propTypes.style,
elevation: React.PropTypes.number,
onPress: React.PropTypes.func.isRequired,
text: React.PropTypes.string,
textContainerStyle: View.propTypes.style,
textStyle: Text.propTypes.style,
touchableContainerStyle: View.propTypes.style,
underlayColor: React.PropTypes.string,
uppercase: React.PropTypes.bool,
containerStyle: PropTypes.style,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please use ViewPropTypes instead of PropTypes (react/react-native@53905a5)

elevation: PropTypes.number,
onPress: PropTypes.func.isRequired,
text: PropTypes.string,
textContainerStyle: PropTypes.style,
textStyle: PropTypes.style,
touchableContainerStyle: PropTypes.style,
underlayColor: PropTypes.string,
uppercase: PropTypes.bool,
};

static defaultProps = {
Expand Down
5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,8 @@
"bugs": {
"url": "https://github.com/Osedea/react-native-simple-button/issues"
},
"homepage": "https://github.com/Osedea/react-native-simple-button#readme"
"homepage": "https://github.com/Osedea/react-native-simple-button#readme",
"dependencies": {
"prop-types": "^15.6.0"
}
}
Loading