Merge pull request #3 from react-navigation/material-next

Update bottom navigation design to match new material guidelines
This commit is contained in:
Brent Vatne
2018-05-24 11:51:19 -07:00
parent 22c844e4f5
commit 072e5f161b
6 changed files with 1076 additions and 547 deletions

View File

@@ -14,10 +14,9 @@
"prop-types": "^15.6.0",
"react": "16.3.1",
"react-native": "~0.55.0",
"react-native-paper": "^1.2.4",
"react-native-safe-area-view": "^0.7.0",
"react-native-tab-view": "^0.0.74",
"react-navigation": "^2.0.0-rc.7"
"react-native-paper": "2.0.0-alpha.0",
"react-navigation": "^2.0.1",
"react-navigation-tabs": "^0.2.0"
},
"devDependencies": {
"babel-plugin-module-resolver": "^3.0.0",
@@ -27,6 +26,9 @@
},
"main": "App.js",
"resolutions": {
"**/hoist-non-react-statics": "2.5.0"
"**/prop-types": "15.6.0",
"**/react-lifecycles-compat": "3.0.4",
"**/hoist-non-react-statics": "2.5.0",
"**/react-native-tab-view": "0.0.78"
}
}

View File

@@ -16,11 +16,6 @@ module.exports = {
return [...dependencies, ...peerDependencies];
},
getBlacklistRE() {
return blacklist([
glob(`${path.resolve(__dirname, '..')}/node_modules/*`),
glob(`${__dirname}/node_modules/*/{${dependencies.join(',')}}`, {
extended: true,
}),
]);
return blacklist([glob(`${path.resolve(__dirname, '..')}/node_modules/*`)]);
},
};

File diff suppressed because it is too large Load Diff

View File

@@ -35,8 +35,8 @@
"dependencies": {
"hoist-non-react-statics": "^2.5.0",
"prop-types": "^15.6.0",
"react-native-paper": "^1.8.0",
"react-navigation-tabs": "0.2.0-rc.0"
"react-native-paper": "2.0.0-alpha.0",
"react-navigation-tabs": "^0.2.0"
},
"devDependencies": {
"@expo/vector-icons": "^6.2.0",
@@ -59,8 +59,8 @@
"react": "16.0.0",
"react-dom": "16.0.0",
"react-native": "~0.50.4",
"react-navigation": "^2.0.0-rc.7",
"react-test-renderer": "16.2.0"
"react-navigation": "^2.0.1",
"react-test-renderer": "16.0.0"
},
"peerDependencies": {
"react": "*",

View File

@@ -6,6 +6,7 @@ import { createTabNavigator, type InjectedProps } from 'react-navigation-tabs';
type Props = InjectedProps & {
activeTintColor?: string,
inactiveTintColor?: string,
};
class BottomNavigationView extends React.Component<Props> {
@@ -19,17 +20,15 @@ class BottomNavigationView extends React.Component<Props> {
render() {
// eslint-disable-next-line no-unused-vars
const { activeTintColor, navigation, descriptors, ...rest } = this.props;
const { activeTintColor, inactiveTintColor, navigation, descriptors, ...rest } = this.props;
return (
<BottomNavigation
{...rest}
navigationState={navigation.state}
getColor={this._getColor}
theme={
/* $FlowFixMe */
activeTintColor ? { colors: { primary: activeTintColor } } : null
}
activeTintColor={activeTintColor}
inactiveTintColor={inactiveTintColor}
/>
);
}

View File

@@ -4509,19 +4509,9 @@ react-native-drawer-layout@1.3.2:
dependencies:
react-native-dismiss-keyboard "1.0.0"
react-native-paper@^1.4.0:
version "1.5.0"
resolved "https://registry.yarnpkg.com/react-native-paper/-/react-native-paper-1.5.0.tgz#36bf1b9e6aeb86b208f52c85312bfd41834963ca"
dependencies:
color "^2.0.1"
create-react-context "^0.2.2"
deepmerge "^2.1.0"
hoist-non-react-statics "^2.5.0"
react-lifecycles-compat "^3.0.2"
react-native-paper@^1.8.0:
version "1.8.0"
resolved "https://registry.yarnpkg.com/react-native-paper/-/react-native-paper-1.8.0.tgz#32e7c52295b617ecf25fc597fe4b49361981344d"
react-native-paper@2.0.0-alpha.0:
version "2.0.0-alpha.0"
resolved "https://registry.yarnpkg.com/react-native-paper/-/react-native-paper-2.0.0-alpha.0.tgz#20ddb59926a45333841db7bb35911543b390cd2e"
dependencies:
color "^2.0.1"
create-react-context "^0.2.2"
@@ -4542,8 +4532,8 @@ react-native-tab-view@^0.0.74:
prop-types "^15.6.0"
react-native-tab-view@~0.0.77:
version "0.0.77"
resolved "https://registry.yarnpkg.com/react-native-tab-view/-/react-native-tab-view-0.0.77.tgz#11ceb8e7c23100d07e628dc151b57797524d00d4"
version "0.0.78"
resolved "https://registry.yarnpkg.com/react-native-tab-view/-/react-native-tab-view-0.0.78.tgz#9b90730d89cbd34a03f0e0ab10e74ca7af945560"
dependencies:
prop-types "^15.6.0"
@@ -4612,26 +4602,15 @@ react-native@~0.50.4:
xmldoc "^0.4.0"
yargs "^9.0.0"
react-navigation-deprecated-tab-navigator@1.1.0:
version "1.1.0"
resolved "https://registry.yarnpkg.com/react-navigation-deprecated-tab-navigator/-/react-navigation-deprecated-tab-navigator-1.1.0.tgz#58945c1c4c7c21b54954e814e8721e98423df75d"
react-navigation-deprecated-tab-navigator@1.2.0:
version "1.2.0"
resolved "https://registry.yarnpkg.com/react-navigation-deprecated-tab-navigator/-/react-navigation-deprecated-tab-navigator-1.2.0.tgz#e0d969c196dcd3a4a440770a7bd97fa058eb4aaf"
dependencies:
react-native-tab-view "^0.0.74"
react-navigation-tabs@0.1.0-alpha.8:
version "0.1.0-alpha.8"
resolved "https://registry.yarnpkg.com/react-navigation-tabs/-/react-navigation-tabs-0.1.0-alpha.8.tgz#bb18699f8496a00f9911c9c75cce243d299c2423"
dependencies:
hoist-non-react-statics "^2.5.0"
prop-types "^15.6.0"
react-lifecycles-compat "^1.0.2"
react-native-paper "^1.4.0"
react-native-safe-area-view "^0.7.0"
react-native-tab-view "~0.0.77"
react-navigation-tabs@0.2.0-rc.0:
version "0.2.0-rc.0"
resolved "https://registry.yarnpkg.com/react-navigation-tabs/-/react-navigation-tabs-0.2.0-rc.0.tgz#671e8c9914b915796879329752f7240147494038"
react-navigation-tabs@0.2.0, react-navigation-tabs@^0.2.0:
version "0.2.0"
resolved "https://registry.yarnpkg.com/react-navigation-tabs/-/react-navigation-tabs-0.2.0.tgz#d25be64e01a728c893a93cfeee6b176ab74d67de"
dependencies:
hoist-non-react-statics "^2.5.0"
prop-types "^15.6.0"
@@ -4639,9 +4618,9 @@ react-navigation-tabs@0.2.0-rc.0:
react-native-safe-area-view "^0.7.0"
react-native-tab-view "~0.0.77"
react-navigation@^2.0.0-rc.7:
version "2.0.0-rc.8"
resolved "https://registry.yarnpkg.com/react-navigation/-/react-navigation-2.0.0-rc.8.tgz#7ec5b49a2a4770b4e88cf87cb8ac1c4644a24ef6"
react-navigation@^2.0.1:
version "2.0.1"
resolved "https://registry.yarnpkg.com/react-navigation/-/react-navigation-2.0.1.tgz#adeba4eb16307c0f740c6c9efafd0c0aa6d47002"
dependencies:
clamp "^1.0.1"
create-react-context "^0.2.1"
@@ -4651,8 +4630,8 @@ react-navigation@^2.0.0-rc.7:
react-lifecycles-compat "^3"
react-native-drawer-layout-polyfill "^1.3.2"
react-native-safe-area-view "^0.7.0"
react-navigation-deprecated-tab-navigator "1.1.0"
react-navigation-tabs "0.1.0-alpha.8"
react-navigation-deprecated-tab-navigator "1.2.0"
react-navigation-tabs "0.2.0"
react-proxy@^1.1.7:
version "1.1.8"
@@ -4670,13 +4649,12 @@ react-reconciler@^0.7.0:
object-assign "^4.1.1"
prop-types "^15.6.0"
react-test-renderer@16.2.0:
version "16.2.0"
resolved "https://registry.yarnpkg.com/react-test-renderer/-/react-test-renderer-16.2.0.tgz#bddf259a6b8fcd8555f012afc8eacc238872a211"
react-test-renderer@16.0.0:
version "16.0.0"
resolved "https://registry.yarnpkg.com/react-test-renderer/-/react-test-renderer-16.0.0.tgz#9fe7b8308f2f71f29fc356d4102086f131c9cb15"
dependencies:
fbjs "^0.8.16"
object-assign "^4.1.1"
prop-types "^15.6.0"
react-test-renderer@^16.0.0-0:
version "16.3.2"