Last active
September 16, 2020 20:48
-
-
Save sabesansathananthan/5fc5839df43934c334a05ecc6c241eed to your computer and use it in GitHub Desktop.
Serverless Material UI Contact form render part
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<form className="contact-form" onSubmit={(e) => this.formSubmit(e)}> | |
<TextField | |
id="standard-multiline-flexible" | |
label="Message" | |
placeholder="Enter Message" | |
variant="outlined" | |
multiline | |
rowsMax={4} | |
value={this.state.message} | |
onChange={(e) => this.setState({ message: e.target.value })} | |
required | |
type="text" | |
/> | |
<br /> | |
<br /> | |
<br /> | |
<TextField | |
id="outlined-basic" | |
placeholder="Enter your name" | |
label="Name" | |
variant="outlined" | |
value={this.state.name} | |
onChange={(e) => this.setState({ name: e.target.value })} | |
required | |
type="text" | |
/> | |
<br /> | |
<br /> | |
<br /> | |
<TextField | |
id="outlined-basic" | |
label="Email" | |
placeholder="Enter email address" | |
variant="outlined" | |
value={this.state.email} | |
onChange={(e) => this.handleChangeEmail(e)} | |
error={this.state.emailError} | |
required | |
type="email" | |
/> | |
<br /> | |
<br /> | |
<br /> | |
<TextField | |
id="outlined-basic" | |
placeholder="Enter Subject" | |
label="Subject" | |
variant="outlined" | |
value={this.state.subject} | |
onChange={(e) => this.setState({ subject: e.target.value })} | |
required | |
/> | |
<br /> | |
<br /> | |
<br /> | |
<div className="button--container"> | |
<button type="submit" className="button button-primary"> | |
{this.state.buttonText} | |
</button> | |
</div> | |
</form> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment