docs: update README

This commit is contained in:
Satyajit Sahoo
2018-03-26 15:01:10 +02:00
parent 2f9145372c
commit 7989f3ab46
3 changed files with 36 additions and 2 deletions

View File

@@ -1,5 +1,39 @@
# React Navigation Tabs
Tab navigators for React Navigation.
## Installation
Open a Terminal in your project's folder and run,
```sh
yarn add react-navigation-tabs react-navigation
```
## Usage
The package exports 3 different navigators:
- `createBottomTabNavigator`: iOS like bottom tabs.
- `createMaterialBottomTabNavigator`: Material design themed animated bottom tabs, from [react-native-paper](https://callstack.github.io/react-native-paper/bottom-navigation.html).
- `createMaterialTopTabNavigator`: Material design themed top tabs with swipe gesture, from [react-native-tab-view](https://github.com/react-native-community/react-native-tab-view).
You can import individual navigators and use them:
```js
import createMaterialBottomTabNavigator from 'react-navigation-tabs/createMaterialBottomTabNavigator';
export default createMaterialBottomTabNavigator({
Album: { screen: Album },
Library: { screen: Library },
History: { screen: History },
Cart: { screen: Cart },
}, {
initialRouteName: 'Album',
activeTintColor: '#F44336',
});
```
[![Build Status][build-badge]][build]
[![Version][version-badge]][package]
[![MIT License][license-badge]][license]

View File

@@ -71,7 +71,7 @@
"peerDependencies": {
"react": "*",
"react-native": "*",
"react-navigation": "*"
"react-navigation": "^2.0.0-alpha.5"
},
"jest": {
"preset": "react-native",

View File

@@ -4231,7 +4231,7 @@ react-native-tab-view@^0.0.74:
dependencies:
prop-types "^15.6.0"
react-native-tab-view@^0.0.75:
react-native-tab-view@~0.0.75:
version "0.0.75"
resolved "https://registry.yarnpkg.com/react-native-tab-view/-/react-native-tab-view-0.0.75.tgz#d71c24645ae1ce84a08152e212912f131906d0a4"
dependencies: