Skip to content

Commit

Permalink
Merge pull request #1 from lifehackett/patch-1
Browse files Browse the repository at this point in the history
Added propType onPress
  • Loading branch information
gnestor committed May 6, 2016
2 parents 6b9b8f9 + 3c4ad5d commit 1c7a176
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ class StatusBarAlert extends Component {
outputRange: [this.props.backgroundColor, this.props.highlightColor || saturate(this.props.backgroundColor, SATURATION)]
}) : this.props.backgroundColor
}]}
onPress={this.props.onPress || null}
onPress={this.props.onPress}
activeOpacity={ACTIVE_OPACITY}
>
<Animated.Text
Expand Down Expand Up @@ -187,6 +187,7 @@ StatusBarAlert.propTypes = {
backgroundColor: PropTypes.string,
highlightColor: PropTypes.string,
color: PropTypes.string,
onPress: PropTypes.func
}

StatusBarAlert.defaultProps = {
Expand All @@ -196,7 +197,8 @@ StatusBarAlert.defaultProps = {
backgroundColor: styles.touchableOpacity.backgroundColor,
highlightColor: null,
color: styles.text.color,
statusbarHeight: STATUS_BAR_HEIGHT
statusbarHeight: STATUS_BAR_HEIGHT,
onPress: null
}

function saturate(color, percent) {
Expand Down

0 comments on commit 1c7a176

Please sign in to comment.