react-native/RNTester/js/RNTesterTitle.js

45 lines
891 B
JavaScript
Raw Normal View History

2015-01-30 01:10:49 +00:00
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @format
* @flow strict-local
2015-01-30 01:10:49 +00:00
*/
2015-01-30 01:10:49 +00:00
'use strict';
var React = require('react');
var ReactNative = require('react-native');
var {StyleSheet, Text, View} = ReactNative;
2015-01-30 01:10:49 +00:00
class RNTesterTitle extends React.Component<$FlowFixMeProps> {
render() {
2015-01-30 01:10:49 +00:00
return (
<View style={styles.container}>
<Text style={styles.text}>{this.props.title}</Text>
2015-01-30 01:10:49 +00:00
</View>
);
}
}
2015-01-30 01:10:49 +00:00
var styles = StyleSheet.create({
container: {
borderRadius: 4,
borderWidth: 0.5,
borderColor: '#d6d7da',
margin: 10,
marginBottom: 0,
2015-01-30 01:10:49 +00:00
height: 45,
padding: 10,
backgroundColor: 'white',
},
text: {
fontSize: 19,
fontWeight: '500',
2015-01-30 01:10:49 +00:00
},
});
module.exports = RNTesterTitle;