how to align text inside react component
'use strict';
var React = require('react-native');
var {
AppRegistry,
StyleSheet,
Text,
Image,
View,
} = React;
var SampleApp = React.createClass({
render: function() {
return (
<View style={styles.container}>
<View style={styles.topBox}>
<Text style={styles.headline}>lorem ipsum{'\n'}ipsum lorem lorem</Text>
</View>
<View style={styles.otherContainer}>
</View>
</View>
);
}
});
var styles = StyleSheet.create({
container: {
flex: 1,
flexDirection: 'column',
backgroundColor: 'red',
justifyContent: 'center',
alignItems: 'center',
},
topBox: {
flex: 1,
flexDirection: 'row',
backgroundColor: 'lightgray',
justifyContent: 'center',
alignItems: 'center',
},
headline: {
fontWeight: 'bold',
fontSize: 18,
marginTop: 0,
width: 200,
height: 80,
backgroundColor: 'yellow',
justifyContent: 'center',
alignItems: 'center',
},
otherContainer: {
flex: 4,
justifyContent: 'center',
alignItems: 'center',
backgroundColor: 'green',
},
});
AppRegistry.registerComponent('SampleApp', () => SampleApp);
module.exports = SampleApp;
Also in JavaScript:
- how to create an array in node js
- cypress upload file
- react native shadow android
- function inside function javascript
- react native components
- how to read if a person has send a message on discord.js
- express req get json
- sort by ascending javascript
- indexof javascript duplicate arrays
- This version of CLI is only compatible with Angular versions ^9.0.0-beta || >=9.0.0 <10.0.0, but Angular version 8.1.3 was found instead.
- javascript get data-id attribute
- open link in new tab jquery
- javascript rpg tutorial
- for each loop class jquery
- how to check if array
- react native exo player build errior resize mode stringdef contextcompat
- html working with JSON data
- remove backslash in json array javascript
- get attribute value jquery href
- how to make an object in p5 go right to left with keycCicked p5
- element.classname javascript
- hello world in jsp
- js object entries
- what is an iterator in javascript