Adds prop types to the project & and uses them in SettingsButton component

This commit is contained in:
Sofiya Tepikin
2018-12-05 22:38:02 +01:00
parent e16fc39298
commit acc7ce13f8
2 changed files with 7 additions and 0 deletions
@@ -1,4 +1,5 @@
import React from 'react'
import PropTypes from 'prop-types'
import { TouchableOpacity } from 'react-native'
import AppText from '../../app-text'
@@ -20,4 +21,9 @@ const SettingsButton = ({ children, ...props }) => {
)
}
SettingsButton.propTypes = {
onPress: PropTypes.func.isRequired,
disabled: PropTypes.bool
}
export default SettingsButton
+1
View File
@@ -26,6 +26,7 @@
"nodejs-mobile-react-native": "^0.3.0",
"object-path": "^0.11.4",
"obv": "0.0.1",
"prop-types": "^15.6.2",
"react": "16.4.1",
"react-native": "~0.56.0",
"react-native-calendars": "^1.19.3",