Files
IWD2-03/INFO-3173 Mobile Development 1/Labs/Lab 4/lab-4-info-app/components/AssetExample.js
T
2026-10-30 16:18:24 -04:00

32 lines
697 B
JavaScript

import { Text, View, StyleSheet, Image } from 'react-native';
export default function AssetExample() {
return (
<View style={styles.container}>
<Text style={styles.paragraph}>
Local files and assets can be imported by dragging and dropping them into the editor
</Text>
<Image style={styles.logo} source={require('../assets/snack-icon.png')} />
</View>
);
}
const styles = StyleSheet.create({
container: {
alignItems: 'center',
justifyContent: 'center',
padding: 24,
},
paragraph: {
margin: 24,
marginTop: 0,
fontSize: 14,
fontWeight: 'bold',
textAlign: 'center',
},
logo: {
height: 128,
width: 128,
}
});