Parcourir la source

Render children and pass props to children (#1159)

Render children and pass props to children
Export SharedElementTransition on iOS
Omit children from passed props
Guy Carmeli il y a 7 ans
Parent
révision
b1f5cfefbb

+ 3
- 2
src/deprecated/indexDeprecated.ios.js Voir le fichier

@@ -1,8 +1,9 @@
1 1
 import Navigation from './../Navigation';
2 2
 import {NavigationToolBarIOS} from './controllers';
3
+import SharedElementTransition from '../views/sharedElementTransition';
3 4
 
4 5
 module.exports = {
5 6
   Navigation,
6
-  NavigationToolBarIOS
7
+  NavigationToolBarIOS,
8
+  SharedElementTransition
7 9
 };
8
-

+ 10
- 2
src/views/sharedElementTransition.ios.js Voir le fichier

@@ -1,11 +1,19 @@
1 1
 import React, {Component} from 'react';
2 2
 import {
3
-  requireNativeComponent,
4 3
   View
5 4
 } from 'react-native';
6 5
 
7 6
 export default class SharedElementTransition extends Component {
7
+  static propTypes = {
8
+    children: PropTypes.object
9
+  };
10
+
8 11
   render() {
9
-    return <View />;
12
+    const {children, ...restProps} = this.props;
13
+    return (
14
+      <View {...restProps}>
15
+        {children}
16
+      </View>
17
+    );
10 18
   }
11 19
 }