Skip to content

Commit

Permalink
Add style and imageStyle props to Navigation.Header.BackButton
Browse files Browse the repository at this point in the history
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 #11554

Differential Revision: D4494460

Pulled By: mkonicek

fbshipit-source-id: 387a69d0b76bb8e7ef47caf1f6141f97fad0ea4b
  • Loading branch information
danscan authored and facebook-github-bot committed Feb 2, 2017
1 parent 2edd455 commit 7812b82
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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>
);

Expand Down

0 comments on commit 7812b82

Please sign in to comment.