Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Scene Props and Etc #2073

Merged
merged 1 commit into from
Jul 20, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 16 additions & 12 deletions docs/API.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,31 +17,35 @@

| Property | Type | Default | Description |
|-----------|----------|----------|--------------------------------------------|
| `key` | `string` | required | Will be used to call screen transition, for example, `Actions.name(params)`. Must be unique. |
| `component` | `React.Component` | semi-required | The `Component` to be displayed. Not required when defining a nested `Scene`, see example. |
| `initial` | `boolean` | false | Set to `true` if this is the first scene to display among its sibling `Scene`s |
| `clone` | `boolean` | false | Scenes marked with `clone` will be treated as templates and cloned into the current scene's parent when pushed. See example. |
| `key`       | `string` | `required` | Will be used to call screen transition, for example, `Actions.name(params)`. Must be unique. |
| `component` | `React.Component` | `semi-required` | The `Component` to be displayed. Not required when defining a nested `Scene`, see example. |
| `initial`   | `boolean` | `false` | Set to `true` if this is the first scene to display among its sibling `Scene`s |
| `clone`     | `boolean` | `false` | Scenes marked with `clone` will be treated as templates and cloned into the current scene's parent when pushed. See example. |
| `on` | `Function` | | aka `onEnter`. Called when the `Scene` is navigated to. `props` are provided as a function param |
| `onExit` | `Function` | | Called when the `Scene` is navigated away from. |
| `success` | `Function` | | If `on` returns a "truthy" value then `success` is called. |
| `failure` | `Function` | | If `on` returns a "falsey" value then `failure` is called. |
| `tabs` | `boolean` | false | load child scenes as [TabNavigator](https://reactnavigation.org/docs/navigators/tab). Other [Tab Navigator props](https://reactnavigation.org/docs/navigators/tab#TabNavigatorConfig) also apply here. |
| `hideTabBar` | `boolean` | false | hide the tab bar (only applies to scenes with `tabs` specified) |
| `tabs`     | `boolean` | `false` | load child scenes as [TabNavigator](https://reactnavigation.org/docs/navigators/tab). Other [Tab Navigator props](https://reactnavigation.org/docs/navigators/tab#TabNavigatorConfig) also apply here. |
| `hideTabBar`     | `boolean` | `false` | hide the tab bar (only applies to scenes with `tabs` specified) |
| `tabBarPosition`     | `string` | | Specifies tabbar position. Defaults to `bottom` on iOS and `top` on Android. |
| `activeTintColor`     | `string` | | Specifies the active tint color for tabbar icons |
| `tabBarComponent` | `React.Component` | | React component to render custom tab bar |
| `drawer` | `boolean` | false | load child scenes inside [DrawerNavigator](https://reactnavigation.org/docs/navigators/drawer) |
| `showLabel`     | `boolean` | `true` | Boolean to show or not the tabbar icons labels |
| `drawer`     | `boolean` | `false` | load child scenes inside [DrawerNavigator](https://reactnavigation.org/docs/navigators/drawer) |
| `contentComponent` | `React.Component` | | Component used to render the content of the drawer (e.g. navigation items). |
| `onLeft` | `boolean` | false | load child scenes as [DrawerNavigator](https://reactnavigation.org/docs/navigators/drawer) |
| `navTransparent` | `boolean` | false | nav bar background transparency |
| `hideNavBar` | `boolean` | false | hide the nav bar |
| `onLeft`     | `boolean` | `false` | load child scenes as [DrawerNavigator](https://reactnavigation.org/docs/navigators/drawer) |
| `navTransparent`     | `boolean` | `false` | nav bar background transparency |
| `hideNavBar`     | `boolean` | `false` | hide the nav bar |
| `title` | `string` | | Text to be displayed in the center of the nav bar. |
| `onLeft` | `Function` | | Called when the left nav bar button is pressed. |
| `onRight` | `Function` | | Called when the right nav bar button is pressed. |
| `leftButtonImage` | `Image` | | Image to substitute for the left nav bar button |
| `leftButtonTextStyle` | `Style` | | Style applied to left button text |
| `rightButtonImage` | `Image` | | Image to substitute for the right nav bar button |
| `rightButtonTextStyle` | `Style` | | Style applied to right button text |
| `modal` | `boolean` | false | |
| `back` | `boolean` | false | Show a back button on the left side of the nav bar that calls `Actions.pop` on press. |
| `modal`     | `boolean` | `false` | |
| `headerBackTitle` | `string` | | Specifies the back button title for scene |
| `back`     | `boolean` | `false` | Show a back button on the left side of the nav bar that calls `Actions.pop` on press. |
| all other props | | | Any other props not listed here will be pass on to the specified `Scene`'s `component` |

## Actions
Expand Down