Skip to content

Commit

Permalink
Merge pull request #808 from sarovin/opacityTitle
Browse files Browse the repository at this point in the history
ADD Opacity Property for the Title of NavBar
  • Loading branch information
aksonov authored Jun 13, 2016
2 parents ca6b98d + 981d94a commit e32eccf
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/NavBar.js
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@ const propTypes = {
leftButtonIconStyle: Image.propTypes.style,
getTitle: PropTypes.func,
titleStyle: Text.propTypes.style,
titleOpacity: PropTypes.number,
position: PropTypes.object,
navigationBarStyle: View.propTypes.style,
renderTitle: PropTypes.any,
Expand All @@ -138,6 +139,7 @@ const contextTypes = {
const defaultProps = {
drawerImage: _drawerImage,
backButtonImage: _backButtonImage,
titleOpacity: 1,
};

class NavBar extends React.Component {
Expand Down Expand Up @@ -365,7 +367,7 @@ class NavBar extends React.Component {
{
opacity: this.props.position.interpolate({
inputRange: [index - 1, index, index + 1],
outputRange: [0, 1, 0],
outputRange: [0, this.props.titleOpacity, 0],
}),
left: this.props.position.interpolate({
inputRange: [index - 1, index + 1],
Expand Down

0 comments on commit e32eccf

Please sign in to comment.