Skip to content

Commit

Permalink
Upgraded RN, React Navigation
Browse files Browse the repository at this point in the history
  • Loading branch information
Supriya Kalghatgi committed Feb 20, 2019
1 parent da0efe9 commit 20b6cc0
Show file tree
Hide file tree
Showing 37 changed files with 436 additions and 984 deletions.
1 change: 1 addition & 0 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,7 @@ android {
}

dependencies {
implementation project(':react-native-gesture-handler')
implementation fileTree(dir: "libs", include: ["*.jar"])
implementation "com.android.support:appcompat-v7:${rootProject.ext.supportLibVersion}"
implementation "com.facebook.react:react-native:+" // From node_modules
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import android.app.Application;

import com.facebook.react.ReactApplication;
import com.swmansion.gesturehandler.react.RNGestureHandlerPackage;
import com.facebook.react.ReactNativeHost;
import com.facebook.react.ReactPackage;
import com.facebook.react.shell.MainReactPackage;
Expand All @@ -22,7 +23,8 @@ public boolean getUseDeveloperSupport() {
@Override
protected List<ReactPackage> getPackages() {
return Arrays.<ReactPackage>asList(
new MainReactPackage()
new MainReactPackage(),
new RNGestureHandlerPackage()
);
}

Expand Down
2 changes: 2 additions & 0 deletions android/settings.gradle
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
rootProject.name = 'NativebaseKitchenSink'
include ':react-native-gesture-handler'
project(':react-native-gesture-handler').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-gesture-handler/android')

include ':app'
376 changes: 236 additions & 140 deletions ios/NativebaseKitchenSink.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

9 changes: 5 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,11 @@
"moment": "2.13.0",
"native-base": "2.11.0",
"prop-types": "^15.6.2",
"react": "16.5.0",
"react-native": "0.58.3",
"react-navigation": "1.5.0",
"react": "16.6.3",
"react-native": "0.58.4",
"react-native-gesture-handler": "^1.0.15",
"react-navigation": "3.3.0",
"scheduler": "^0.12.0",
"styled-components": "^3.4.5"
}
}
}
11 changes: 7 additions & 4 deletions src/App.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import React from "react";
import { Root } from "native-base";
import { StackNavigator, DrawerNavigator } from "react-navigation";
// import { StackNavigator, DrawerNavigator } from "react-navigation";
import { createDrawerNavigator, createStackNavigator, createAppContainer } from "react-navigation";

import Header from "./screens/Header/";
import Header1 from "./screens/Header/1";
Expand Down Expand Up @@ -137,7 +138,7 @@ import Actionsheet from "./screens/actionsheet";
import NHAccordion from "./screens/accordion/";
import NHDatePicker from "./screens/datepicker/";

const Drawer = DrawerNavigator(
const Drawer = createDrawerNavigator(
{
Home: { screen: Home },
Anatomy: { screen: Anatomy },
Expand Down Expand Up @@ -176,7 +177,7 @@ const Drawer = DrawerNavigator(
}
);

const AppNavigator = StackNavigator(
const AppNavigator = createStackNavigator(
{
Drawer: { screen: Drawer },

Expand Down Expand Up @@ -309,7 +310,9 @@ const AppNavigator = StackNavigator(
}
);

const AppContainer = createAppContainer(AppNavigator);

export default () =>
<Root>
<AppNavigator />
<AppContainer />
</Root>;
2 changes: 1 addition & 1 deletion src/screens/Header/index.android.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ class HeaderNB extends Component {
<Left>
<Button
transparent
onPress={() => this.props.navigation.navigate("DrawerOpen")}
onPress={() => this.props.navigation.openDrawer()}
>
<Icon name="menu" />
</Button>
Expand Down
2 changes: 1 addition & 1 deletion src/screens/Header/index.ios.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ class HeaderNB extends Component {
<Left>
<Button
transparent
onPress={() => this.props.navigation.navigate("DrawerOpen")}
onPress={() => this.props.navigation.openDrawer()}
>
<Icon name="menu" />
</Button>
Expand Down
2 changes: 1 addition & 1 deletion src/screens/accordion/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ class NHAccordion extends Component {
<Left>
<Button
transparent
onPress={() => this.props.navigation.navigate("DrawerOpen")}
onPress={() => this.props.navigation.openDrawer()}
>
<Icon name="menu" />
</Button>
Expand Down
2 changes: 1 addition & 1 deletion src/screens/actionsheet/index.android.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ class NHPicker extends Component {
<Left>
<Button
transparent
onPress={() => this.props.navigation.navigate("DrawerOpen")}
onPress={() => this.props.navigation.openDrawer()}
>
<Icon name="menu" />
</Button>
Expand Down
2 changes: 1 addition & 1 deletion src/screens/actionsheet/index.ios.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export default class ActionSheetNB extends Component {
<Left>
<Button
transparent
onPress={() => this.props.navigation.navigate("DrawerOpen")}
onPress={() => this.props.navigation.openDrawer()}
>
<Icon name="ios-menu" />
</Button>
Expand Down
2 changes: 1 addition & 1 deletion src/screens/anatomy/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class Anatomy extends Component {
<Left>
<Button
transparent
onPress={() => this.props.navigation.navigate("DrawerOpen")}
onPress={() => this.props.navigation.openDrawer()}
>
<Icon name="ios-menu" />
</Button>
Expand Down
2 changes: 1 addition & 1 deletion src/screens/badge/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class NHBadge extends Component {
<Left>
<Button
transparent
onPress={() => this.props.navigation.navigate("DrawerOpen")}
onPress={() => this.props.navigation.openDrawer()}
>
<Icon name="menu" />
</Button>
Expand Down
2 changes: 1 addition & 1 deletion src/screens/button/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ class NHButton extends Component {
<Left>
<Button
transparent
onPress={() => this.props.navigation.navigate("DrawerOpen")}
onPress={() => this.props.navigation.openDrawer()}
>
<Icon name="menu" />
</Button>
Expand Down
2 changes: 1 addition & 1 deletion src/screens/card/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ class NHCard extends Component {
<Left>
<Button
transparent
onPress={() => this.props.navigation.navigate("DrawerOpen")}
onPress={() => this.props.navigation.openDrawer()}
>
<Icon name="menu" />
</Button>
Expand Down
2 changes: 1 addition & 1 deletion src/screens/checkbox/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ class NHCheckbox extends Component {
<Left>
<Button
transparent
onPress={() => this.props.navigation.navigate("DrawerOpen")}
onPress={() => this.props.navigation.openDrawer()}
>
<Icon name="menu" />
</Button>
Expand Down
2 changes: 1 addition & 1 deletion src/screens/datepicker/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class NHDatePicker extends Component {
<Left>
<Button
transparent
onPress={() => this.props.navigation.navigate("DrawerOpen")}
onPress={() => this.props.navigation.openDrawer()}
>
<Icon name="ios-menu" />
</Button>
Expand Down
2 changes: 1 addition & 1 deletion src/screens/deckswiper/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ class NHDeckSwiper extends Component {
<Left>
<Button
transparent
onPress={() => this.props.navigation.navigate("DrawerOpen")}
onPress={() => this.props.navigation.openDrawer()}
>
<Icon name="menu" />
</Button>
Expand Down
2 changes: 1 addition & 1 deletion src/screens/fab/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class NHFab extends Component {
<Left>
<Button
transparent
onPress={() => this.props.navigation.navigate("DrawerOpen")}
onPress={() => this.props.navigation.openDrawer()}
>
<Icon name="menu" />
</Button>
Expand Down
2 changes: 1 addition & 1 deletion src/screens/footer/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ class NHFooter extends Component {
<Left>
<Button
transparent
onPress={() => this.props.navigation.navigate("DrawerOpen")}
onPress={() => this.props.navigation.openDrawer()}
>
<Icon name="menu" />
</Button>
Expand Down
2 changes: 1 addition & 1 deletion src/screens/form/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ class NHForm extends Component {
<Left>
<Button
transparent
onPress={() => this.props.navigation.navigate("DrawerOpen")}
onPress={() => this.props.navigation.openDrawer()}
>
<Icon name="menu" />
</Button>
Expand Down
2 changes: 1 addition & 1 deletion src/screens/home/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class Home extends Component {
<View style={{ marginBottom: 80 }}>
<Button
style={{ backgroundColor: "#6FAF98", alignSelf: "center" }}
onPress={() => this.props.navigation.navigate("DrawerOpen")}
onPress={() => this.props.navigation.openDrawer()}
>
<Text>Lets Go!</Text>
</Button>
Expand Down
2 changes: 1 addition & 1 deletion src/screens/icon/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ class NHIcon extends Component {
<Left>
<Button
transparent
onPress={() => this.props.navigation.navigate("DrawerOpen")}
onPress={() => this.props.navigation.openDrawer()}
>
<Icon name="menu" />
</Button>
Expand Down
2 changes: 1 addition & 1 deletion src/screens/layout/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ class NHLayout extends Component {
<Left>
<Button
transparent
onPress={() => this.props.navigation.navigate("DrawerOpen")}
onPress={() => this.props.navigation.openDrawer()}
>
<Icon name="menu" />
</Button>
Expand Down
2 changes: 1 addition & 1 deletion src/screens/list/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ class NHList extends Component {
<Left>
<Button
transparent
onPress={() => this.props.navigation.navigate("DrawerOpen")}
onPress={() => this.props.navigation.openDrawer()}
>
<Icon name="menu" />
</Button>
Expand Down
2 changes: 1 addition & 1 deletion src/screens/listSwipe/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ class ListSwipe extends Component {
<Left>
<Button
transparent
onPress={() => this.props.navigation.navigate("DrawerOpen")}
onPress={() => this.props.navigation.openDrawer()}
>
<Icon name="menu" />
</Button>
Expand Down
2 changes: 1 addition & 1 deletion src/screens/picker/index.android.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ class NHPicker extends Component {
<Left>
<Button
transparent
onPress={() => this.props.navigation.navigate("DrawerOpen")}
onPress={() => this.props.navigation.openDrawer()}
>
<Icon name="menu" />
</Button>
Expand Down
2 changes: 1 addition & 1 deletion src/screens/picker/index.ios.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ class NHPicker extends Component {
<Left>
<Button
transparent
onPress={() => this.props.navigation.navigate("DrawerOpen")}
onPress={() => this.props.navigation.openDrawer()}
>
<Icon name="menu" />
</Button>
Expand Down
2 changes: 1 addition & 1 deletion src/screens/radio/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class NHRadio extends Component {
<Left>
<Button
transparent
onPress={() => this.props.navigation.navigate("DrawerOpen")}
onPress={() => this.props.navigation.openDrawer()}
>
<Icon name="menu" />
</Button>
Expand Down
2 changes: 1 addition & 1 deletion src/screens/searchbar/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class NHSearchbar extends Component {
<Content padder>
<Button
block
onPress={() => this.props.navigation.navigate("DrawerOpen")}
onPress={() => this.props.navigation.openDrawer()}
>
<Text>Back</Text>
</Button>
Expand Down
2 changes: 1 addition & 1 deletion src/screens/segment/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ class NBSegment extends Component {
<Left>
<Button
transparent
onPress={() => this.props.navigation.navigate("DrawerOpen")}
onPress={() => this.props.navigation.openDrawer()}
>
<Icon name="menu" />
</Button>
Expand Down
2 changes: 1 addition & 1 deletion src/screens/spinner/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class NHSpinner extends Component {
<Left>
<Button
transparent
onPress={() => this.props.navigation.navigate("DrawerOpen")}
onPress={() => this.props.navigation.openDrawer()}
>
<Icon name="menu" />
</Button>
Expand Down
2 changes: 1 addition & 1 deletion src/screens/tab/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ class NHTab extends Component {
<Left>
<Button
transparent
onPress={() => this.props.navigation.navigate("DrawerOpen")}
onPress={() => this.props.navigation.openDrawer()}
>
<Icon name="menu" />
</Button>
Expand Down
2 changes: 1 addition & 1 deletion src/screens/thumbnail/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class NHThumbnail extends Component {
<Left>
<Button
transparent
onPress={() => this.props.navigation.navigate("DrawerOpen")}
onPress={() => this.props.navigation.openDrawer()}
>
<Icon name="menu" />
</Button>
Expand Down
2 changes: 1 addition & 1 deletion src/screens/toast/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ class NHToast extends Component {
<Left>
<Button
transparent
onPress={() => this.props.navigation.navigate("DrawerOpen")}
onPress={() => this.props.navigation.openDrawer()}
>
<Icon name="menu" />
</Button>
Expand Down
2 changes: 1 addition & 1 deletion src/screens/typography/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class NHTypography extends Component {
<Left>
<Button
transparent
onPress={() => this.props.navigation.navigate("DrawerOpen")}
onPress={() => this.props.navigation.openDrawer()}
>
<Icon name="menu" />
</Button>
Expand Down
Loading

0 comments on commit 20b6cc0

Please sign in to comment.