Added language support
This commit is contained in:
@ -10,6 +10,8 @@ import React from 'react';
|
||||
|
||||
import { Form, InputGroup, TextInput } from './Form';
|
||||
import Button from './../components/Button';
|
||||
import { connect } from 'react-redux';
|
||||
import Language from './../../language/Language';
|
||||
|
||||
class ContactForm extends React.Component {
|
||||
constructor(props) {
|
||||
@ -19,23 +21,28 @@ class ContactForm extends React.Component {
|
||||
render() {
|
||||
return (
|
||||
<Form className={this.props.className}>
|
||||
<InputGroup title="Name">
|
||||
<TextInput placeholder="Enter your name." />
|
||||
<InputGroup title={Language.get("contact.form.name.label")} >
|
||||
<TextInput placeholder={Language.get("contact.form.name.placeholder")} />
|
||||
</InputGroup>
|
||||
|
||||
<InputGroup title="Email">
|
||||
<TextInput type="email" placeholder="Enter your email address." />
|
||||
<InputGroup title={Language.get("contact.form.email.label")}>
|
||||
<TextInput type="email" placeholder={Language.get("contact.form.email.placeholder")} />
|
||||
</InputGroup>
|
||||
|
||||
<InputGroup title="Message">
|
||||
<TextInput multiline placeholder="Enter your message here." />
|
||||
<InputGroup title={Language.get("contact.form.message.label")}>
|
||||
<TextInput multiline placeholder={Language.get("contact.form.message.placeholder")} />
|
||||
</InputGroup>
|
||||
|
||||
<Button to="/">Home</Button>
|
||||
<Button submit>Contact</Button>
|
||||
<Button submit>{Language.get("contact.form.submit")}</Button>
|
||||
</Form>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default ContactForm;
|
||||
const mapStateToProps = function(state) {
|
||||
return {
|
||||
code: state.language.code
|
||||
}
|
||||
}
|
||||
|
||||
export default connect(mapStateToProps)(ContactForm);
|
||||
|
Reference in New Issue
Block a user