Fixes for form

This commit is contained in:
Ram Reddy 2021-02-03 22:57:48 -05:00
parent 109a4839cb
commit cac2bbda6a
2 changed files with 12 additions and 3 deletions

View File

@ -1,7 +1,7 @@
import React, {Component} from "react"; import React, {Component} from "react";
import emailjs from "emailjs-com"; import emailjs from "emailjs-com";
import styled, {createGlobalStyle} from 'styled-components'; import styled, {createGlobalStyle} from 'styled-components';
import {StyledFormWrapper, StyledForm, StyledButton, StyledError, StyledInput, StyledTextArea, sharedStyles} from "./assets/StyledContactForm.js"; import {StyledFormWrapper, StyledForm, StyledButton, StyledError, StyledInput, StyledTextArea, sharedStyles, StyledTextAreaSubject} from "./assets/StyledContactForm.js";
const GlobalStyle = createGlobalStyle` const GlobalStyle = createGlobalStyle`
@ -97,7 +97,7 @@ class ContactForm extends Component {
onChange={this.handleEmailChange} onChange={this.handleEmailChange}
/> />
<label htmlFor="subject">Subject</label> <label htmlFor="subject">Subject</label>
<StyledTextArea <StyledTextAreaSubject
name="subject" name="subject"
onChange={this.handleSubjectChange} onChange={this.handleSubjectChange}
/> />

View File

@ -34,6 +34,14 @@ const StyledInput = styled.input`
${sharedStyles} ${sharedStyles}
`; `;
const StyledTextAreaSubject = styled.textarea`
background-color: #eee;
width: 100%;
min-height: 60px;
resize: none;
${sharedStyles}
`;
const StyledTextArea = styled.textarea` const StyledTextArea = styled.textarea`
background-color: #eee; background-color: #eee;
width: 100%; width: 100%;
@ -68,5 +76,6 @@ export {
StyledInput, StyledInput,
StyledTextArea, StyledTextArea,
StyledButton, StyledButton,
StyledError StyledError,
StyledTextAreaSubject
}; };