Skip to content

Commit

Permalink
Added a prop to optionally disable the nexButton
Browse files Browse the repository at this point in the history
  • Loading branch information
Steve committed Aug 23, 2017
1 parent 653f98b commit 6e72f19
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ export default class extends Component {
automaticallyAdjustContentInsets: PropTypes.bool,
showsPagination: PropTypes.bool,
showsButtons: PropTypes.bool,
disableNextButton: PropTypes.bool,
loadMinimal: PropTypes.bool,
loadMinimalSize: PropTypes.number,
loadMinimalLoader: PropTypes.element,
Expand Down Expand Up @@ -160,6 +161,7 @@ export default class extends Component {
automaticallyAdjustContentInsets: false,
showsPagination: true,
showsButtons: false,
disableNextButton: false,
loop: true,
loadMinimal: false,
loadMinimalSize: 1,
Expand Down Expand Up @@ -534,7 +536,10 @@ export default class extends Component {
}

return (
<TouchableOpacity onPress={() => button !== null && this.scrollBy(1)}>
<TouchableOpacity
onPress={() => button !== null && this.scrollBy(1)}
disabled={this.props.disableNextButton}
>
<View>
{button}
</View>
Expand Down

0 comments on commit 6e72f19

Please sign in to comment.