Modifying Stepper Transition to avoid glitches
This commit is contained in:
parent
ed1e349002
commit
d214ca2f67
|
@ -33,6 +33,13 @@ type PageProps = {
|
||||||
prepareNextInitialProps: (values: Object) => {},
|
prepareNextInitialProps: (values: Object) => {},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const transitionProps = {
|
||||||
|
timeout: {
|
||||||
|
enter: 350,
|
||||||
|
exit: 0,
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
class GnoStepper extends React.PureComponent<Props, State> {
|
class GnoStepper extends React.PureComponent<Props, State> {
|
||||||
static Page = ({ children }: PageProps) => children
|
static Page = ({ children }: PageProps) => children
|
||||||
|
|
||||||
|
@ -156,7 +163,7 @@ class GnoStepper extends React.PureComponent<Props, State> {
|
||||||
{steps.map(label => (
|
{steps.map(label => (
|
||||||
<FormStep key={label}>
|
<FormStep key={label}>
|
||||||
<StepLabel>{label}</StepLabel>
|
<StepLabel>{label}</StepLabel>
|
||||||
<StepContent>
|
<StepContent TransitionProps={transitionProps}>
|
||||||
{activePage(controls, ...rest)}
|
{activePage(controls, ...rest)}
|
||||||
</StepContent>
|
</StepContent>
|
||||||
</FormStep>
|
</FormStep>
|
||||||
|
|
Loading…
Reference in New Issue