accounts-frontend/src/components/auth/appInfo/AppInfo.jsx
2016-05-19 22:50:15 +03:00

48 lines
1.4 KiB
JavaScript

import React, { Component, PropTypes } from 'react';
import { FormattedMessage as Message } from 'react-intl';
import { Button } from 'components/ui/form';
import { LangMenu } from 'components/langMenu';
import styles from './appInfo.scss';
import messages from './AppInfo.intl.json';
export default class AppInfo extends Component {
static displayName = 'AppInfo';
static propTypes = {
name: PropTypes.string,
description: PropTypes.string,
onGoToAuth: PropTypes.func.isRequired
};
render() {
const { name, description, onGoToAuth } = this.props;
return (
<div className={styles.appInfo}>
<div className={styles.logoContainer}>
<h2 className={styles.logo}>
{name ? name : (
<Message {...messages.appName} />
)}
</h2>
</div>
<div className={styles.descriptionContainer}>
<p className={styles.description}>
{description}
</p>
</div>
<div className={styles.goToAuth}>
<Button onClick={onGoToAuth} label={messages.goToAuth} />
</div>
<div className={styles.langMenu}>
<LangMenu />
</div>
</div>
);
}
}