Rename ScrollMotion -> SlideMotion

This commit is contained in:
SleepWalker 2017-11-19 20:16:15 +02:00
parent b62a60222b
commit 66d4d2ceb5
5 changed files with 9 additions and 9 deletions

View File

@ -4,7 +4,7 @@ import PropTypes from 'prop-types';
import { FormattedMessage as Message } from 'react-intl';
import Helmet from 'react-helmet';
import { ScrollMotion } from 'components/ui/motion';
import { SlideMotion } from 'components/ui/motion';
import { ScrollIntoView } from 'components/ui/scroll';
import { Input, Button, Form, FormModel, FormError } from 'components/ui/form';
import { BackButton } from 'components/profile/ProfileForm';
@ -130,7 +130,7 @@ export default class ChangeEmail extends Component {
const isCodeSpecified = !!this.props.code;
return (
<ScrollMotion activeStep={activeStep}>
<SlideMotion activeStep={activeStep}>
{(new Array(STEPS_TOTAL)).fill(0).map((_, step) => {
const form = this.props.stepForms[step];
@ -142,7 +142,7 @@ export default class ChangeEmail extends Component {
isActiveStep: step === activeStep
});
})}
</ScrollMotion>
</SlideMotion>
);
}

View File

@ -4,7 +4,7 @@ import React, { Component } from 'react';
import { Button, FormModel } from 'components/ui/form';
import styles from 'components/profile/profileForm.scss';
import Stepper from 'components/ui/stepper';
import { ScrollMotion } from 'components/ui/motion';
import { SlideMotion } from 'components/ui/motion';
import { ScrollIntoView } from 'components/ui/scroll';
import logger from 'services/logger';
import mfa from 'services/api/mfa';
@ -102,7 +102,7 @@ export default class MfaEnable extends Component<Props, {
const {activeStep, secret, qrCodeSrc} = this.state;
return (
<ScrollMotion activeStep={activeStep}>
<SlideMotion activeStep={activeStep}>
{[
<Instructions key="step1" />,
<KeyForm key="step2"
@ -116,7 +116,7 @@ export default class MfaEnable extends Component<Props, {
onInvalid={() => this.forceUpdate()}
/>
]}
</ScrollMotion>
</SlideMotion>
);
}

View File

@ -4,9 +4,9 @@ import React, { Component } from 'react';
import { Motion, spring } from 'react-motion';
import MeasureHeight from 'components/MeasureHeight';
import styles from './scroll-motion.scss';
import styles from './slide-motion.scss';
export default class ScrollMotion extends Component<{
export default class SlideMotion extends Component<{
activeStep: number,
children: *
}, {

View File

@ -1,2 +1,2 @@
// @flow
export { default as ScrollMotion } from './ScrollMotion';
export { default as SlideMotion } from './SlideMotion';