Adds prop types to the project & and uses them in SettingsButton component
This commit is contained in:
@@ -1,4 +1,5 @@
|
|||||||
import React from 'react'
|
import React from 'react'
|
||||||
|
import PropTypes from 'prop-types'
|
||||||
|
|
||||||
import { TouchableOpacity } from 'react-native'
|
import { TouchableOpacity } from 'react-native'
|
||||||
import AppText from '../../app-text'
|
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
|
export default SettingsButton
|
||||||
@@ -26,6 +26,7 @@
|
|||||||
"nodejs-mobile-react-native": "^0.3.0",
|
"nodejs-mobile-react-native": "^0.3.0",
|
||||||
"object-path": "^0.11.4",
|
"object-path": "^0.11.4",
|
||||||
"obv": "0.0.1",
|
"obv": "0.0.1",
|
||||||
|
"prop-types": "^15.6.2",
|
||||||
"react": "16.4.1",
|
"react": "16.4.1",
|
||||||
"react-native": "~0.56.0",
|
"react-native": "~0.56.0",
|
||||||
"react-native-calendars": "^1.19.3",
|
"react-native-calendars": "^1.19.3",
|
||||||
|
|||||||
Reference in New Issue
Block a user