Skip to content

Commit

Permalink
Another generic back button (#5295)
Browse files Browse the repository at this point in the history
* renamed BackAndroidButton to BackButton

* export BackButton as AndroidBackButton to maintain backward compat

* Match name of class to the filename
  • Loading branch information
DonnieWest authored and timdorr committed Jul 5, 2017
1 parent 66631a2 commit 64f0aec
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
Expand Up @@ -2,7 +2,7 @@ import React, { Component } from 'react'
import PropTypes from 'prop-types'
import { BackHandler } from 'react-native'

class AndroidBackButton extends Component {
class BackButton extends Component {
static contextTypes = {
router: PropTypes.shape({
history: PropTypes.shape({
Expand Down Expand Up @@ -35,4 +35,4 @@ class AndroidBackButton extends Component {
}
}

export default AndroidBackButton
export default BackButton
5 changes: 3 additions & 2 deletions packages/react-router-native/main.js
Expand Up @@ -2,11 +2,12 @@ export * from 'react-router'
import NativeRouter from './NativeRouter'
import Link from './Link'
import DeepLinking from './DeepLinking'
import AndroidBackButton from './AndroidBackButton'
import BackButton from './BackButton'

export {
NativeRouter,
Link,
DeepLinking,
AndroidBackButton
BackButton,
BackButton as AndroidBackButton
}
2 changes: 1 addition & 1 deletion packages/react-router-native/package.json
Expand Up @@ -9,7 +9,7 @@
"DeepLinking.js",
"Link.js",
"NativeRouter.js",
"AndroidBackButton.js",
"BackButton.js",
"main.js",
"experimental/StackRoute.js",
"experimental/TabRoutes.js"
Expand Down

0 comments on commit 64f0aec

Please sign in to comment.