Advertisement
Felanpro

React Native (Touchables)

May 14th, 2023
29
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.79 KB | None | 0 0
  1. import { StatusBar } from 'expo-status-bar';
  2. import { StyleSheet, Text, View, TouchableWithoutFeedback, TouchableOpacity, TouchableHighlight, Image, SafeAreaView } from 'react-native';
  3.  
  4. export default function App() {
  5.  
  6. const handlePress = () => console.log("Text pressed");
  7.  
  8. return (
  9. <SafeAreaView style={styles.container}>
  10.  
  11. <Text>Hello world!</Text>
  12.  
  13. <TouchableHighlight onPress={() => console.log("image tapped")}>
  14. <Image
  15. blurRadius = {1}
  16. source = {require('./assets/favicon.png')}
  17. />
  18. </TouchableHighlight>
  19.  
  20. <StatusBar style="auto" />
  21.  
  22. </SafeAreaView>
  23. );
  24. }
  25.  
  26. const styles = StyleSheet.create({
  27. container: {
  28. flex: 1,
  29. backgroundColor: 'gray',
  30. justifyContent: "center",
  31. alignItems: "center"
  32. },
  33. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement