Modifying Stepper Transition to avoid glitches

This commit is contained in:
apanizo 2018-10-03 13:33:20 +02:00
parent ed1e349002
commit d214ca2f67
1 changed files with 8 additions and 1 deletions

View File

@ -33,6 +33,13 @@ type PageProps = {
prepareNextInitialProps: (values: Object) => {},
}
const transitionProps = {
timeout: {
enter: 350,
exit: 0,
},
}
class GnoStepper extends React.PureComponent<Props, State> {
static Page = ({ children }: PageProps) => children
@ -156,7 +163,7 @@ class GnoStepper extends React.PureComponent<Props, State> {
{steps.map(label => (
<FormStep key={label}>
<StepLabel>{label}</StepLabel>
<StepContent>
<StepContent TransitionProps={transitionProps}>
{activePage(controls, ...rest)}
</StepContent>
</FormStep>