uppy/examples/react-native-expo/PauseResumeButton.js
Renée Kooi 733de659da
Upgrade standard to v14 (#1860)
* Update eslint dependencies.

* standard --fix

* build: disable handler name lint rule

* status-bar: manually fix lint errors

* webcam: manually fix lint errors

* url: manually fix lint errors

* react-native: manually fix lint errors

* dashboard: manually fix lint errors

* informer: manually fix linting errors

* progress-bar: manually fix lint errors

* provider-views: manually fix lint errors

* redux-dev-tools: manually fix lint errors

* build: disable buggy no-unused-vars rule

* examples: manually fix lint errors

* ` quotes for code things, ' for text things
2019-10-09 14:53:02 +02:00

32 lines
669 B
JavaScript

import React from 'react' // eslint-disable-line no-unused-vars
import { StyleSheet, Text, TouchableHighlight } from 'react-native'
export default function PauseResumeButton (props) {
if (!props.uploadStarted || props.uploadComplete) {
return null
}
return (
<TouchableHighlight
onPress={props.onPress}
style={styles.button}
>
<Text
style={styles.text}
>{props.isPaused ? 'Resume' : 'Pause'}
</Text>
</TouchableHighlight>
)
}
const styles = StyleSheet.create({
button: {
backgroundColor: '#cc0077',
padding: 10
},
text: {
color: '#fff',
textAlign: 'center',
fontSize: 17
}
})