Skip to content

Instantly share code, notes, and snippets.

@karanjagota
Created October 22, 2020 14:53
Show Gist options
  • Save karanjagota/6b44d789b6fae4f649e4a20285d6f9a9 to your computer and use it in GitHub Desktop.
Save karanjagota/6b44d789b6fae4f649e4a20285d6f9a9 to your computer and use it in GitHub Desktop.
import React from 'react';
import { StyleSheet, Text, View } from 'react-native';
export default function App() {
return (
<View style={styles.viewstyle}>
<Text style={styles.textstyle}>Text Component Inside a View</Text>
</View>
);
}
const styles = StyleSheet.create({
viewstyle:{
flex:1,
margin:10
},
textstyle: {
fontSize:18,
backgroundColor: '#f50057',
marginBottom: 10,
color:'#ffffff',
padding:10,
textAlign: 'center',
borderRadius:20
},
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment