Skip to content

Conversation

cainaleaouk
Copy link

Please provide enough information so that others can review your pull request:

Explain the motivation for making this change. What existing problem does the pull request solve?

Adds some missing documentation about how to customise the contentComponent prop of the DrawerNavigator component, as well as clarifying what the contentComponent actually is.

Followup to #177

- `drawerWidth` - Width of the drawer
- `drawerPosition` - Options are `left` or `right`. Default is `left` position.
- `contentComponent` - Component to use to render the navigation items. Receives the `navigation` prop for the drawer. Defaults to `DrawerView.Items`.
- `contentComponent` - Component to use to render a container with the navigation items. Receives the `navigation` prop for the drawer. Defaults to `DrawerView.Items`.

This comment was marked as abuse.

This comment was marked as abuse.

- `paths` - Provide a mapping of routeName to path config, which overrides the paths set in the routeConfigs.
- `backBehavior` - Should the back button cause switch to the initial route? If yes, set to `initialRoute`, otherwise `none`. Defaults to `initialRoute` behavior.

### Overriding `contentComponent`

This comment was marked as abuse.

@ericvicenti ericvicenti merged commit 498f329 into react-navigation:master Mar 22, 2017
lintonye added a commit to lintonye/react-navigation that referenced this pull request Mar 25, 2017
* master:
  Docs: Update md links from coodoo's fork to react-community (react-navigation#750)
  Navigation Actions Doc (react-navigation#338)
  Update documentation regarding `DrawerNavigator` customisation (react-navigation#646)
  Fix flow in Navigation Playground (react-navigation#735)
  Adds documentation about forking and syncing repo (react-navigation#765)
  fix(docs): Fix incorrect style in TabNavigator sample (react-navigation#734)
  correction of a few documentation typo (react-navigation#563)
  Fix typo in docs for getComponentForRouteName (react-navigation#714)
  Drawer sidebar description (react-navigation#617)
  Remove 2nd return statement (react-navigation#661)
  Resolve gesture issues in CardStack
  Update dependencies
  Bump version number (react-navigation#650)
  Update react-native-tab-view. Fixes react-navigation#476 (react-navigation#641)
  Remove top margin from drawer view (react-navigation#642)
  Pass `transitionProps`, `prevTransitionProps` and `isModal` to custom `TransitionConfig` (react-navigation#565)
  Fix issue where initialRouteParams were not set (react-navigation#150)
sourcecode911 pushed a commit to sourcecode911/react-navigation that referenced this pull request Mar 9, 2020
…-navigation#646)

* Update documentation regarding `DrawerNavigator` customisation

* Updated docs as requested in the PR.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants