mirror of
https://github.com/transloadit/uppy.git
synced 2026-01-23 02:25:07 +00:00
30 lines
600 B
JavaScript
30 lines
600 B
JavaScript
import { StyleSheet, Text, TouchableHighlight } from 'react-native'
|
|
|
|
export default function PauseResumeButton({
|
|
uploadStarted,
|
|
uploadComplete,
|
|
isPaused,
|
|
onPress,
|
|
}) {
|
|
if (!uploadStarted || uploadComplete) {
|
|
return null
|
|
}
|
|
|
|
return (
|
|
<TouchableHighlight onPress={onPress} style={styles.button}>
|
|
<Text style={styles.text}>{isPaused ? 'Resume' : 'Pause'}</Text>
|
|
</TouchableHighlight>
|
|
)
|
|
}
|
|
|
|
const styles = StyleSheet.create({
|
|
button: {
|
|
backgroundColor: '#cc0077',
|
|
padding: 10,
|
|
},
|
|
text: {
|
|
color: '#fff',
|
|
textAlign: 'center',
|
|
fontSize: 17,
|
|
},
|
|
})
|