uppy/examples/react-native-expo/PauseResumeButton.js
Mikael Finstad d31c90e443
Run biome check on main (#5896)
this time on main
closes #5891

also: fix a11y tabIndex (key event handler)
2025-08-11 10:06:21 +02:00

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,
},
})