Permalink
Browse files

Setting up the Contact Form component

  • Loading branch information...
ionofzion committed Nov 2, 2018
1 parent 4577afc commit b10b88c4b06340eb50415411de59a4b7d4c2c089
Showing with 52 additions and 5 deletions.
  1. +41 −0 app/components/contactForm.jsx
  2. +4 −2 app/containers/Shortcode.jsx
  3. +7 −3 app/containers/Widget.jsx
@@ -0,0 +1,41 @@
import React from 'react';
export default class ContactForm extends React.Component {
render() {
return (
<div>
<form>
<label>
Name:
<input
type="text"
name="name"
/>
</label>
<label>
Email:
<input
type="email"
name="email"
/>
</label>
<label>
Message:
<textarea
name="message"
/>
</label>
<button
id="submit"
className="button button-primary"
>Submit</button>
</form>;
</div>
);
}
}
@@ -1,12 +1,14 @@
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import ContactForm from '../components/contactForm';
export default class Shortcode extends Component {
render() {
return (
<div>
<h1>WP Reactivate Frontend</h1>
<p>Title: {this.props.wpObject.title}</p>
<h1>{this.props.wpObject.title}</h1>
<ContactForm wpObject={this.props.wpObject} />
</div>
);
}
@@ -1,14 +1,18 @@
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import ContactForm from '../components/contactForm';
export default class Widget extends Component {
render() {
return (
<div>
<h1>WP Reactivate Widget</h1>
<p>Title: {this.props.wpObject.title}</p>
<section className="widget">
<h1 className="widget-title">{this.props.wpObject.title}</h1>
<ContactForm wpObject={this.props.wpObject} />
</section>
</div>
);
);
}
}

0 comments on commit b10b88c

Please sign in to comment.