[change] use ES2015 modules

Ref #102
This commit is contained in:
Nicolas Gallagher
2017-06-10 13:51:53 -07:00
parent 060d96b42d
commit 43d297bf59
101 changed files with 208 additions and 238 deletions

View File

@@ -26,8 +26,8 @@
import React from 'react';
import { storiesOf } from '@kadira/storybook';
import UIExplorer from '../../UIExplorer';
import { any, bool, object, string } from 'prop-types';
import { StyleSheet, Text, TextInput, View } from 'react-native';
import { any, bool, string } from 'prop-types';
import { StyleSheet, Text, TextInput, TextPropTypes, View } from 'react-native';
class WithLabel extends React.Component {
static propTypes = {
@@ -320,7 +320,7 @@ class SelectionExample extends React.Component {
static propTypes = {
multiline: bool,
style: object,
style: TextPropTypes.style,
value: string
};

View File

@@ -37,13 +37,13 @@ class Flip extends React.Component {
this._animate();
}
_animate() {
_animate = () => {
this.state.theta.setValue(0);
Animated.timing(this.state.theta, {
toValue: 360,
duration: 5000
}).start(this._animate);
}
};
render() {
return (
@@ -255,4 +255,4 @@ const examples = [
}
];
module.exports = examples;
export default examples;

View File

@@ -438,4 +438,4 @@ const calculatorStyles = StyleSheet.create({
}
});
module.exports = Calculator;
export default Calculator;

View File

@@ -323,4 +323,4 @@ const styles = StyleSheet.create({
AppRegistry.registerComponent('Game2048', () => Game2048);
module.exports = Game2048;
export default Game2048;

View File

@@ -207,4 +207,4 @@ Board.prototype.hasLost = function() {
return !canMove;
};
module.exports = Board;
export default Board;

View File

@@ -325,4 +325,4 @@ const styles = StyleSheet.create({
AppRegistry.registerComponent('TicTacToeApp', () => TicTacToeApp);
module.exports = TicTacToeApp;
export default TicTacToeApp;