Last active
October 21, 2022 17:37
-
-
Save rafaelmotta/0b80819d60eef20204dad7d8f79d1ad2 to your computer and use it in GitHub Desktop.
React Native Integration
This file contains hidden or 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
import { FootprintButton } from '@onefooprint/footprint-react-native'; | |
import { View, StyleSheet } from 'react-native'; | |
const Screen = () => { | |
const handleCompleted = (validationToken: string) => { | |
console.log(validationToken) | |
} | |
const handleCanceled = () => { | |
console.log('user canceled') | |
} | |
return ( | |
<View styles={styles.main}> | |
<FootprintButton | |
publicKey="ob_test_WNgSBRR7uxoT8JRDBBflgw" | |
onCompleted={handleCompleted} | |
onCanceled={handleCanceled} | |
/> | |
</View> | |
) | |
} | |
const styles = StyleSheet.create({ | |
container: { | |
flex: 1, | |
alignItems: 'center', | |
justifyContent: 'center' | |
} | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment