Первые попытки анимации

This commit is contained in:
SleepWalker
2016-01-18 07:28:43 +02:00
parent 9aff4fb83a
commit 7696f9e4bf
7 changed files with 100 additions and 20 deletions

View File

@@ -1,4 +1,6 @@
import React, { Component } from 'react';
import { connect } from 'react-redux';
import { routeActions } from 'redux-simple-router';
import { FormattedMessage as Message } from 'react-intl';
import Helmet from 'react-helmet';
@@ -11,7 +13,7 @@ import { Input, Checkbox } from 'components/ui/Form';
import styles from './signIn.scss';
import messages from './SignIn.messages';
export default class Login extends Component {
class Login extends Component {
displayName = 'Login';
render() {
@@ -24,7 +26,7 @@ export default class Login extends Component {
<Input icon="envelope" type="email" placeholder="E-mail or username" />
</PanelBody>
<PanelFooter>
<button className={buttons.green}>
<button className={buttons.green} onClick={this.onSubmit}>
<Message {...messages.next} />
</button>
</PanelFooter>
@@ -37,4 +39,15 @@ export default class Login extends Component {
</div>
);
}
onSubmit = (event) => {
event.preventDefault();
this.props.push('/password');
};
}
export default connect(null, {
push: routeActions.push
})(Login);

View File

@@ -77,14 +77,14 @@ $authBodyLeftRightPadding: 32px;
$authBodyTopBottomPadding: 30px;
.authBody {
composes: body from './../ui/panel.scss';
composes: body from 'components/ui/panel.scss';
padding: $authBodyTopBottomPadding $authBodyLeftRightPadding;
text-align: left;
}
.authBodyHeader {
composes: defaultBodyHeader from './../ui/panel.scss';
composes: defaultBodyHeader from 'components/ui/panel.scss';
// Отступы сверху и снизу разные т.к. мы ужимаем высоту линии строки с логином на 2 пикселя и из-за этого теряем отступ снизу
padding: 15px $authBodyLeftRightPadding 17px;