Last active
March 5, 2019 12:47
-
-
Save Taym95/be71afc6523f6d062d1e80adcaf0ab56 to your computer and use it in GitHub Desktop.
Take screenshot of a modal with react-native-view-shot
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class ExampleCaptureModal extends Component { | |
onCapture = uri => { | |
this.refs.viewShot.capture().then(uri => { | |
console.log("do something with ", uri); | |
}); | |
} | |
render() { | |
return ( | |
<ViewShot ref="viewShot" options={{ format: "jpg", quality: 0.9 }}> | |
<Modal>Your Modal content</Modal> | |
</ViewShot> | |
); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment