Parcourir la source

add pause/resume buttons

Artur Paikin il y a 6 ans
Parent
commit
dad4056835
1 fichiers modifiés avec 15 ajouts et 0 suppressions
  1. 15 0
      examples/react-native-expo/App.js

+ 15 - 0
examples/react-native-expo/App.js

@@ -142,6 +142,21 @@ function SelectAndUploadFileWithUppy (props) {
             accessibilityLabel="Open uploaded file"
           />
         }
+
+        <Button
+          onPress={(ev) => {
+            this.uppy.pauseAll()
+          }}
+          title="Pause All"
+          accessibilityLabel="Pause All"
+        />
+        <Button
+          onPress={(ev) => {
+            this.uppy.resumeAll()
+          }}
+          title="Resume All"
+          accessibilityLabel="Resume All"
+        />
       </TouchableOpacity>
       <Text>Status: {props.state.status}</Text>
       <Text>{props.state.progress} of {props.state.total}</Text>