Skip to content

Instantly share code, notes, and snippets.

@felisio
Created July 19, 2021 16:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save felisio/97364b57dbcf4e81bc1d9b198411737c to your computer and use it in GitHub Desktop.
Save felisio/97364b57dbcf4e81bc1d9b198411737c to your computer and use it in GitHub Desktop.
Acuant form Spike
import React from 'react';
import {
Dimensions,
SafeAreaView,
ScrollView,
StyleSheet,
View,
} from 'react-native';
import WebView from 'react-native-webview';
const ACUANT_URI = 'https://regtech.identitymind.store/viewform/jzxpm/';
type WebViewFormProps = {
uri: string;
};
const WebViewForm: React.FC<WebViewFormProps> = ({uri}) => {
return (
<View style={styles.webViewContainer}>
<WebView style={styles.webView} source={{uri}} />
</View>
);
};
const App = () => {
return (
<SafeAreaView>
<ScrollView contentInsetAdjustmentBehavior="automatic">
<View>
<WebViewForm uri={ACUANT_URI} />
</View>
</ScrollView>
</SafeAreaView>
);
};
const WINDOW_WIDTH = Dimensions.get('window').width;
const WINDOW_HEIGHT = Dimensions.get('window').height;
const styles = StyleSheet.create({
webView: {
width: WINDOW_WIDTH,
},
webViewContainer: {
flex: 1,
justifyContent: 'center',
alignItems: 'center',
width: WINDOW_WIDTH,
height: WINDOW_HEIGHT - 30,
},
});
export default App;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment