Adding penultimate to Stepper's controls
This commit is contained in:
parent
d8e5456354
commit
a64278bd51
|
@ -19,13 +19,14 @@ type Props = {
|
||||||
firstPage: boolean,
|
firstPage: boolean,
|
||||||
lastPage: boolean,
|
lastPage: boolean,
|
||||||
disabled: boolean,
|
disabled: boolean,
|
||||||
|
penultimate: boolean,
|
||||||
}
|
}
|
||||||
|
|
||||||
const Controls = ({
|
const Controls = ({
|
||||||
onPrevious, firstPage, lastPage, disabled,
|
onPrevious, firstPage, penultimate, lastPage, disabled,
|
||||||
}: Props) => {
|
}: Props) => {
|
||||||
// eslint-disable-next-line
|
// 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'
|
const back = firstPage ? 'Cancel' : 'Back'
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|
Loading…
Reference in New Issue