Move SnapshotView to SnapshotViewIOS and create an unimplemented android version
Reviewed By: @andreicoman11 Differential Revision: D2536373 fb-gh-sync-id: 0f671e8198175a15540b74d54e53eee941aa0c1b
This commit is contained in:
parent
a102e6f587
commit
19e11232fe
|
@ -19,7 +19,7 @@ var React = require('react-native');
|
|||
var {
|
||||
AppRegistry,
|
||||
Settings,
|
||||
SnapshotView,
|
||||
SnapshotViewIOS,
|
||||
StyleSheet,
|
||||
} = React;
|
||||
|
||||
|
@ -85,9 +85,9 @@ COMPONENTS.concat(APIS).forEach((Example) => {
|
|||
render: function() {
|
||||
var Renderable = UIExplorerListBase.makeRenderable(Example);
|
||||
return (
|
||||
<SnapshotView>
|
||||
<SnapshotViewIOS>
|
||||
<Renderable />
|
||||
</SnapshotView>
|
||||
</SnapshotViewIOS>
|
||||
);
|
||||
},
|
||||
});
|
||||
|
|
|
@ -0,0 +1,13 @@
|
|||
/**
|
||||
* 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 SnapshotViewIOS
|
||||
*/
|
||||
'use strict';
|
||||
|
||||
module.exports = require('UnimplementedView');
|
|
@ -6,7 +6,7 @@
|
|||
* 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 SnapshotView
|
||||
* @providesModule SnapshotViewIOS
|
||||
* @flow
|
||||
*/
|
||||
'use strict';
|
||||
|
@ -19,7 +19,7 @@ var View = require('View');
|
|||
|
||||
var requireNativeComponent = require('requireNativeComponent');
|
||||
|
||||
var SnapshotView = React.createClass({
|
||||
var SnapshotViewIOS = React.createClass({
|
||||
onDefaultAction: function(event: Object) {
|
||||
TestModule.verifySnapshot(TestModule.markTestPassed);
|
||||
},
|
||||
|
@ -52,7 +52,7 @@ var style = StyleSheet.create({
|
|||
});
|
||||
|
||||
var RCTSnapshot = Platform.OS === 'ios' ?
|
||||
requireNativeComponent('RCTSnapshot', SnapshotView) :
|
||||
requireNativeComponent('RCTSnapshot', SnapshotViewIOS) :
|
||||
View;
|
||||
|
||||
module.exports = SnapshotView;
|
||||
module.exports = SnapshotViewIOS;
|
|
@ -34,7 +34,7 @@ var ReactNative = Object.assign(Object.create(require('React')), {
|
|||
ScrollView: require('ScrollView'),
|
||||
SegmentedControlIOS: require('SegmentedControlIOS'),
|
||||
SliderIOS: require('SliderIOS'),
|
||||
SnapshotView: require('SnapshotView'),
|
||||
SnapshotViewIOS: require('SnapshotViewIOS'),
|
||||
Switch: require('Switch'),
|
||||
SwitchAndroid: require('SwitchAndroid'),
|
||||
SwitchIOS: require('SwitchIOS'),
|
||||
|
|
Loading…
Reference in New Issue