react-native/RNTester/js/RNTesterTitle.js

52 lines
1.0 KiB
JavaScript
Raw Normal View History

2015-01-30 01:10:49 +00:00
/**
* Copyright (c) 2015-present, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*
* @providesModule RNTesterTitle
* @flow
2015-01-30 01:10:49 +00:00
*/
'use strict';
var React = require('react');
var ReactNative = require('react-native');
2015-01-30 01:10:49 +00:00
var {
StyleSheet,
Text,
View,
} = ReactNative;
2015-01-30 01:10:49 +00:00
class RNTesterTitle extends React.Component {
render() {
2015-01-30 01:10:49 +00:00
return (
<View style={styles.container}>
<Text style={styles.text}>
{this.props.title}
</Text>
</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;