diff --git a/src/components/Stepper/index.jsx b/src/components/Stepper/index.jsx index 5dc21fb6..f5c6f985 100644 --- a/src/components/Stepper/index.jsx +++ b/src/components/Stepper/index.jsx @@ -2,6 +2,7 @@ import Stepper from '@material-ui/core/Stepper' import FormStep from '@material-ui/core/Step' import StepLabel from '@material-ui/core/StepLabel' +import StepContent from '@material-ui/core/StepContent' import { withStyles } from '@material-ui/core/styles' import * as React from 'react' import GnoForm from '~/components/forms/GnoForm' @@ -123,36 +124,38 @@ class GnoStepper extends React.PureComponent { return ( - - {steps.map(label => ( - - {label} - - ))} - - {(submitting: boolean, validating: boolean) => { + {(submitting: boolean, validating: boolean, ...rest: any) => { const disabled = disabledWhenValidating ? submitting || validating : submitting return ( - - - - - + + {steps.map(label => ( + + {label} + + {activePage(rest)} + + + + + + + + ))} + ) }} diff --git a/src/components/forms/GnoForm/index.jsx b/src/components/forms/GnoForm/index.jsx index 9a0a5e76..f808048f 100644 --- a/src/components/forms/GnoForm/index.jsx +++ b/src/components/forms/GnoForm/index.jsx @@ -15,7 +15,6 @@ type Props = { padding: number, validation?: (values: Object) => Object | Promise, initialValues?: Object, - render: Function, } const stylesBasedOn = (padding: number): $Shape => ({ @@ -26,7 +25,7 @@ const stylesBasedOn = (padding: number): $Shape => ({ }) const GnoForm = ({ - onSubmit, validation, initialValues, children, padding, render, + onSubmit, validation, initialValues, children, padding, }: Props) => (
( - {render(rest)} - {children(rest.submitting, rest.validating)} + {children(rest.submitting, rest.validating, rest)}
)} />