Skip to content

Instantly share code, notes, and snippets.

@andrew-levy
Last active August 24, 2022 16:15
Show Gist options
  • Save andrew-levy/454bb4b11296ed02f2012aeec60ec447 to your computer and use it in GitHub Desktop.
Save andrew-levy/454bb4b11296ed02f2012aeec60ec447 to your computer and use it in GitHub Desktop.
import { useState } from 'react';
import {
View,
Text,
Image,
TextInput,
StyleSheet
} from 'react-native';
function App() {
const [text, setText] = useState('');
return (
<View style={styles.container}>
<Text style={styles.title}>Some cool text</Text>
<Image
src={{ uri: require('../assets/bolt.fill.svg') }}
styles={styles.image}
/>
<TextInput
value={text}
onChangeText={(newText) => setText(newText)}
placeholder="Name"
/>
</View>
);
}
const styles = StyleSheet.create({
container: {
justifyContent: 'flex-start',
paddingLeft: 30,
borderRadius: 20,
backgroundColor: '#F2F2F7FF'
},
title: { fontSize: 28 },
image: {
width: 100,
height: 100,
},
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment