Skip to content

Commit

Permalink
build(idx): add idx as dev dep and improve flow
Browse files Browse the repository at this point in the history
  • Loading branch information
jgcmarins committed Jul 25, 2018
1 parent 7cd906f commit eba0081
Show file tree
Hide file tree
Showing 5 changed files with 373 additions and 352 deletions.
13 changes: 10 additions & 3 deletions components/Button.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// @flow

import React from 'react';
import * as React from 'react';
import { StyleSheet, Text, TouchableOpacity, Image } from 'react-native';

const styles = StyleSheet.create({
Expand All @@ -25,8 +25,15 @@ const styles = StyleSheet.create({
},
});

// TODO - improve flow
export default ({ buttonStyle, onPress, iconSrc, textStyle, children }: any) => (
type Props = {
buttonStyle: Object,
onPress: () => void,
iconSrc: string,
textStyle: Object,
children: typeof React.Children,
};

export default ({ buttonStyle, onPress, iconSrc, textStyle, children }: Props) => (
<TouchableOpacity activeOpacity={0.5} style={[styles.button, buttonStyle]} onPress={onPress}>
<Image style={styles.icon} source={iconSrc} />
<Text style={[styles.buttonText, textStyle]}>{children}</Text>
Expand Down
4 changes: 2 additions & 2 deletions components/Overlay.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// @flow

import React from 'react';
import * as React from 'react';
import { Animated, StyleSheet } from 'react-native';

const DEFAULT_ANIMATE_TIME = 300;
Expand All @@ -24,7 +24,7 @@ const styles = StyleSheet.create({
type Props = {
visible: boolean,
onCancel: () => void,
children: React.Node,
children: typeof React.Children,
};

type State = {
Expand Down
3 changes: 2 additions & 1 deletion components/Sheet.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
// @flow

import React from 'react';
import * as React from 'react';
import { Animated } from 'react-native';

const DEFAULT_BOTTOM = -300;
const DEFAULT_ANIMATE_TIME = 300;

type Props = {
children: typeof React.Children,
visible: boolean,
};

Expand Down
15 changes: 12 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,27 @@
"eslint-plugin-import": "^2.11.0",
"eslint-plugin-react": "^7.6.1",
"eslint-plugin-react-native": "^3.2.0",
"flow-bin": "^0.69.0",
"flow-bin": "^0.77.0",
"generate-changelog": "1.7.0",
"husky": "^0.14.3",
"minimist": "1.2.0",
"idx": "^2.4.0",
"lint-staged": "^7.0.0",
"minimist": "1.2.0",
"pre-commit": "^1.2.2",
"prettier": "^1.12.0",
"react": "16.3.1",
"react-native": "0.55.2",
"simple-git": "1.89.0"
},
"keywords": ["react-native", "android", "ios", "windows", "bridge", "react"],
"keywords": [
"react-native",
"android",
"ios",
"windows",
"bridge",
"react",
"share"
],
"nativePackage": true,
"author": {
"name": "Esteban Fuentealba",
Expand Down
Loading

0 comments on commit eba0081

Please sign in to comment.