mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-03-26 07:04:05 +08:00
'Update app properties in runtime' UIExplorer demo
Reviewed By: javache Differential Revision: D2615815 fb-gh-sync-id: 557ce1b2bc76360fe19a0893e0f317c09b685e23
This commit is contained in:
committed by
facebook-github-bot-2
parent
eae91cc680
commit
f1712b0cc3
@@ -22,6 +22,8 @@ var {
|
||||
AppRegistry,
|
||||
NavigatorIOS,
|
||||
StyleSheet,
|
||||
Text,
|
||||
View
|
||||
} = React;
|
||||
|
||||
var UIExplorerApp = React.createClass({
|
||||
@@ -72,6 +74,27 @@ var styles = StyleSheet.create({
|
||||
},
|
||||
});
|
||||
|
||||
var SetPropertiesExampleApp = React.createClass({
|
||||
|
||||
render: function() {
|
||||
var wrapperStyle = {
|
||||
backgroundColor: this.props.color,
|
||||
flex: 1,
|
||||
alignItems: 'center',
|
||||
justifyContent: 'center'
|
||||
};
|
||||
|
||||
return (
|
||||
<View style={wrapperStyle}>
|
||||
<Text>
|
||||
Embedded React Native view
|
||||
</Text>
|
||||
</View>
|
||||
);
|
||||
},
|
||||
});
|
||||
|
||||
AppRegistry.registerComponent('SetPropertiesExampleApp', () => SetPropertiesExampleApp);
|
||||
AppRegistry.registerComponent('UIExplorerApp', () => UIExplorerApp);
|
||||
UIExplorerList.registerComponents();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user