Add `style` and `imageStyle` props to Navigation.Header.BackButton

Summary:
This PR adds`style` and `imageStyle` props to `Navigation.Header.BackButton` which allows for usage like:

```javascript
<NavigationExperimental.Header.BackButton
  imageStyle={{ tintColor: 'white' }}
  onPress={props.onNavigateBack}
/>
```
Closes https://github.com/facebook/react-native/pull/11554

Differential Revision: D4494460

Pulled By: mkonicek

fbshipit-source-id: 387a69d0b76bb8e7ef47caf1f6141f97fad0ea4b
This commit is contained in:
Dan Scanlon 2017-02-02 04:50:52 -08:00 committed by Facebook Github Bot
parent 2edd455c65
commit 7812b82b18
1 changed files with 4 additions and 2 deletions

View File

@ -35,12 +35,14 @@ const {
} = ReactNative;
type Props = {
imageStyle?: any,
onPress: Function,
style?: any,
};
const NavigationHeaderBackButton = (props: Props) => (
<TouchableOpacity style={styles.buttonContainer} onPress={props.onPress}>
<Image style={styles.button} source={require('./assets/back-icon.png')} />
<TouchableOpacity style={[styles.buttonContainer, props.style]} onPress={props.onPress}>
<Image style={[styles.button, props.imageStyle]} source={require('./assets/back-icon.png')} />
</TouchableOpacity>
);