Advertisement
Felanpro

React Native (Buttons)

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