Untitled
unknown
javascript
2 years ago
878 B
40
Indexable
import { StatusBar } from 'expo-status-bar';
import { StyleSheet, Text, View, Image, Button } from 'react-native';
export default function App() {
const handlePress = () => {
alert('¡Hola mundo!');
};
return (
<View style={styles.container}>
<Text style={styles.title}>Bienvenido a mi app</Text>
<Image
source={{ uri: 'https://docs.expo.dev/static/images/tutorial/logo.png' }}
style={styles.image}
/>
<Button title="Presiona aquí" onPress={handlePress} />
<StatusBar style="auto" />
</View>
);
}
const styles = StyleSheet.create({
container: {
flex: 1,
backgroundColor: '#f0f0f0',
alignItems: 'center',
justifyContent: 'center',
},
title: {
fontSize: 24,
color: '#333',
marginBottom: 20,
},
image: {
width: '50%',
aspectRatio: 1,
marginBottom: 20,
},
});
Editor is loading...