Skip to content

Commit d028055

Browse files
mcabs3aksonov
authored andcommitted
Updated API docs to add missing attributes (aksonov#2315)
- added missing Tab props - added Drawer section with props - added jsconfig.json to gitignore (Visual Code config)
1 parent c3f5fd5 commit d028055

File tree

2 files changed

+16
-3
lines changed

2 files changed

+16
-3
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -34,3 +34,4 @@ node_modules/
3434
*.log
3535

3636
.vscode/
37+
jsconfig.json

docs/API.md

+15-3
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,11 @@ The basic routing component for this router, all `<Scene>` components require a
2323
|-----------|----------|----------|--------------------------------------------|
2424
| `key`       | `string` | `required` | Will be used to call screen transition, for example, `Actions.name(params)`. Must be unique. |
2525
| `component` | `React.Component` | `semi-required` | The `Component` to be displayed. Not required when defining a nested `Scene`, see example. |
26-
| `activeTintColor`     | `string` | | Specifies the active tint color for tabbar icons |
2726
| `animationEnabled`     | `boolean` | `true` | Enable or disable animating tabs on switch. |
2827
| `back`     | `boolean` | `false` | Show a back button on the left side of the nav bar that calls `Actions.pop` on press. |
2928
| `clone`     | `boolean` | `false` | Scenes marked with `clone` will be treated as templates and cloned into the current scene's parent when pushed. See example. |
3029
| `contentComponent` | `React.Component` | | Component used to render the content of the drawer (e.g. navigation items). |
3130
| `drawer`     | `boolean` | `false` | load child scenes inside [DrawerNavigator](https://reactnavigation.org/docs/navigators/drawer) |
32-
| `drawerImage` | `Image` | | Image to substitute drawer 'hamburger' icon, you have to set it together with `drawer` prop |
3331
| `failure` | `Function` | | If `on` returns a "falsey" value then `failure` is called. |
3432
| `headerBackTitle` | `string` | | Specifies the back button title for scene |
3533
| `headerMode` | `string` | `float` | Specifies how the header should be rendered: `float` (render a single header that stays at the top and animates as screens are changed. This is a common pattern on iOS.), `screen` (each screen has a header attached to it and the header fades in and out together with the screen. This is a common pattern on Android) or `none` (No header will be rendered) |
@@ -43,6 +41,8 @@ The basic routing component for this router, all `<Scene>` components require a
4341
| `navBar` | `React.Component`| | Optional React component to render custom NavBar |
4442
| `navBarButtonColor` | `string` | | Set the color of the back button in the navBar |
4543
| `navigationBarStyle`     | `Style` | | Style applied to nav bar |
44+
| `navigationBarTitleImage` | `Image` | | Override the image in the center of the navbar, replacing the `title` |
45+
| `navigationBarTitleImageStyle` | `object` | | Styles to apply to `navigationBarTitleImage` |
4646
| `navTransparent`     | `boolean` | `false` | nav bar background transparency |
4747
| `on` | `Function` | | aka `onEnter` |
4848
| `onEnter` | `Function` | | Called when the `Scene` is navigated to. `props` are provided as a function param. Only scenes with 'component' defined is supported |
@@ -64,10 +64,15 @@ Can use all `props` listed above in `<Scene>` as `<Tabs>` is syntatic sugar for
6464

6565
| Property | Type | Default | Description |
6666
|-----------------|----------|----------|--------------------------------------------|
67-
| `activeTintColor`     | `string` | | Specifies the active tint color for tabbar icons |
6867
| `activeBackgroundColor` | `string` | | Specifies the active background color for the tab in focus |
68+
| `activeTintColor`     | `string` | | Specifies the active tint color for tabbar icons |
69+
| `inactiveBackgroundColor` | `string` | | Specifies the inactive background color for the tabs not in focus |
70+
| `inactiveTintColor`     | `string` | | Specifies the inactive tint color for tabbar icons |
71+
| `labelStyle` | `object` | | Overrides the styles for the tab label |
6972
| `tabBarComponent` | `React.Component` | | React component to render custom tab bar |
7073
| `tabBarPosition`     | `string` | | Specifies tabbar position. Defaults to `bottom` on iOS and `top` on Android. |
74+
| `tabBarStyle` | `object` | | Override the tabbar styles |
75+
| `tabStyle` | `object` | | Override the style for an individual tab of the tabbar |
7176
| `showLabel`     | `boolean` | `true` | Boolean to show or not the tabbar icons labels |
7277
| `swipeEnabled`     | `boolean` | `true` | Enable or disable swiping tabs. |
7378

@@ -80,6 +85,13 @@ A `Scene` that is a direct child of `Tabs` and can use all `props` listed above
8085
| `icon` | `component` | `undefined` | a React Native component to place as a tab icon
8186
| `tabBarLabel` | `string` | | The string to override a tab label |
8287

88+
## Drawer (`<Drawer>` or `<Scene drawer>`)
89+
Can use all `prop` as listed in `Scene` as `<Drawer>`, syntatic sugar for `<Scene drawer={true}>`
90+
91+
| Property | Type | Default | Description |
92+
| `drawerImage` | `Image` | | Image to substitute drawer 'hamburger' icon, you have to set it together with `drawer` prop |
93+
| `drawerIcon` | `Image` | | *See `drawerImage`* |
94+
| `drawerPosition` | `string` | Determines whether the drawer is on the right or the left. Keywords accepted are `right` and `left` |
8395

8496
## Actions
8597

0 commit comments

Comments
 (0)