mirror of
https://github.com/elyby/accounts-frontend.git
synced 2025-05-31 14:11:58 +05:30
Немного адаптивности
This commit is contained in:
@@ -1,10 +1,23 @@
|
||||
import React, { Component } from 'react';
|
||||
import React, { Component, PropTypes } from 'react';
|
||||
|
||||
import { FormattedMessage as Message } from 'react-intl';
|
||||
|
||||
import buttons from 'components/ui/buttons.scss';
|
||||
|
||||
import styles from './appInfo.scss';
|
||||
import messages from './AppInfo.messages';
|
||||
|
||||
export default class AppInfo extends Component {
|
||||
static displayName = 'AppInfo';
|
||||
|
||||
static propTypes = {
|
||||
name: PropTypes.string.isRequired,
|
||||
description: PropTypes.string.isRequired,
|
||||
onGoToAuth: PropTypes.func.isRequired
|
||||
};
|
||||
|
||||
export default class SignIn extends Component {
|
||||
render() {
|
||||
var { name, description } = this.props;
|
||||
var { name, description, onGoToAuth } = this.props;
|
||||
|
||||
return (
|
||||
<div className={styles.appInfo}>
|
||||
@@ -16,6 +29,11 @@ export default class SignIn extends Component {
|
||||
{description}
|
||||
</p>
|
||||
</div>
|
||||
<div className={styles.goToAuth}>
|
||||
<button className={buttons.green} onClick={onGoToAuth}>
|
||||
<Message {...messages.goToAuth} />
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
8
src/components/auth/AppInfo.messages.js
Normal file
8
src/components/auth/AppInfo.messages.js
Normal file
@@ -0,0 +1,8 @@
|
||||
import { defineMessages } from 'react-intl';
|
||||
|
||||
export default defineMessages({
|
||||
goToAuth: {
|
||||
id: 'goToAuth',
|
||||
defaultMessage: 'Go to auth'
|
||||
}
|
||||
});
|
||||
@@ -2,6 +2,8 @@
|
||||
@import '~components/ui/fonts.scss';
|
||||
|
||||
.appInfo {
|
||||
max-width: 270px;
|
||||
margin: 0 auto;
|
||||
padding: 55px 25px;
|
||||
}
|
||||
|
||||
@@ -39,3 +41,12 @@
|
||||
font-size: 13px;
|
||||
line-height: 1.7;
|
||||
}
|
||||
|
||||
.goToAuth {
|
||||
}
|
||||
|
||||
@media (min-width: 720px) {
|
||||
.goToAuth {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user