mirror of
https://github.com/transloadit/uppy.git
synced 2026-01-24 02:46:39 +00:00
33 lines
666 B
JavaScript
33 lines
666 B
JavaScript
import React from 'react'
|
|
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,
|
|
},
|
|
})
|