Adding penultimate to Stepper's controls

This commit is contained in:
apanizo 2018-10-03 17:34:44 +02:00
parent d8e5456354
commit a64278bd51
1 changed files with 3 additions and 2 deletions

View File

@ -19,13 +19,14 @@ type Props = {
firstPage: boolean,
lastPage: boolean,
disabled: boolean,
penultimate: boolean,
}
const Controls = ({
onPrevious, firstPage, lastPage, disabled,
onPrevious, firstPage, penultimate, lastPage, disabled,
}: Props) => {
// eslint-disable-next-line
const next = firstPage ? 'Start' : lastPage ? 'Submit' : 'Next'
const next = firstPage ? 'Start' : penultimate ? 'Review' : lastPage ? 'Submit' : 'Next'
const back = firstPage ? 'Cancel' : 'Back'
return (