2015-04-17 00:14:11 +00:00
|
|
|
/**
|
|
|
|
* Common implementation for a simple stubbed view. Simply applies the view's styles to the inner
|
|
|
|
* View component and renders its children.
|
|
|
|
*
|
|
|
|
* @providesModule UnimplementedView
|
|
|
|
*/
|
|
|
|
|
|
|
|
'use strict';
|
|
|
|
|
|
|
|
var React = require('React');
|
|
|
|
var StyleSheet = require('StyleSheet');
|
|
|
|
|
2016-07-26 08:00:02 +00:00
|
|
|
class UnimplementedView extends React.Component {
|
|
|
|
setNativeProps = () => {
|
2015-04-17 00:14:11 +00:00
|
|
|
// Do nothing.
|
|
|
|
// This method is required in order to use this view as a Touchable* child.
|
|
|
|
// See ensureComponentIsNative.js for more info
|
2016-07-26 08:00:02 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
render() {
|
2015-11-23 21:02:05 +00:00
|
|
|
// Workaround require cycle from requireNativeComponent
|
|
|
|
var View = require('View');
|
2015-04-17 00:14:11 +00:00
|
|
|
return (
|
|
|
|
<View style={[styles.unimplementedView, this.props.style]}>
|
|
|
|
{this.props.children}
|
|
|
|
</View>
|
|
|
|
);
|
2016-07-26 08:00:02 +00:00
|
|
|
}
|
|
|
|
}
|
2015-04-17 00:14:11 +00:00
|
|
|
|
|
|
|
var styles = StyleSheet.create({
|
|
|
|
unimplementedView: {
|
|
|
|
borderWidth: 1,
|
|
|
|
borderColor: 'red',
|
|
|
|
alignSelf: 'flex-start',
|
|
|
|
}
|
|
|
|
});
|
|
|
|
|
|
|
|
module.exports = UnimplementedView;
|