Skip to content

Commit 60bb1cf

Browse files
committed
remove all props in ContactUsForm.js
update ContactUsForm styles to no longer use
1 parent 0c51af3 commit 60bb1cf

File tree

2 files changed

+2
-19
lines changed

2 files changed

+2
-19
lines changed

components/ContactUsForm/index.js

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,6 @@ function ContactUsForm({ subscribe, setResponseMessage }) {
102102
//no white space pattern
103103
pattern: /[^\s-]/i,
104104
})}
105-
$inputType='name'
106105
/>
107106
<S.ErrorMsg>
108107
{errors.Name?.type === 'required'
@@ -120,7 +119,6 @@ function ContactUsForm({ subscribe, setResponseMessage }) {
120119
required: true,
121120
pattern: /^\S+@\S+$/i,
122121
})}
123-
$inputType='email'
124122
/>
125123
<S.ErrorMsg>
126124
{errors.Email?.type === 'required' && 'Email is required'}
@@ -133,7 +131,6 @@ function ContactUsForm({ subscribe, setResponseMessage }) {
133131
minLength: 2,
134132
pattern: /[^\s-]/i,
135133
})}
136-
$inputType='email'
137134
/>
138135
<S.ErrorMsg>
139136
{errors.Subject?.type === 'required'
@@ -151,7 +148,6 @@ function ContactUsForm({ subscribe, setResponseMessage }) {
151148
pattern: /[^\s-]/i,
152149
})}
153150
placeholder='Write your message here'
154-
$inputType='message'
155151
/>
156152
<S.ErrorMsg>
157153
{errors.Message?.type === 'required'

components/ContactUsForm/styles.js

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -59,20 +59,18 @@ const Input = styled.input`
5959
border-radius: 3rem;
6060
max-width: 25rem;
6161
`)}
62-
63-
//check props for button variations
64-
${props => (props.$inputType === 'message' ? InputMessage : '')}
6562
`;
6663

6764
const TextArea = styled.textarea`
6865
display: block;
6966
font-size: 1.2rem;
7067
border-radius: 1rem;
71-
height: 2rem;
68+
height: 13rem;
7269
padding: 1.2rem 1.25rem;
7370
border: 1px solid ${$darkBgColor};
7471
max-width: 100%;
7572
width: 24rem;
73+
font-family: inherit;
7674
7775
&::placeholder {
7876
color: ${$primaryContentColor};
@@ -85,21 +83,10 @@ const TextArea = styled.textarea`
8583
//media query mixins
8684
${m.largeDesktop(css`
8785
font-size: 1.5rem;
88-
height: 3rem;
8986
border-radius: 3rem;
9087
max-width: 25rem;
9188
`)}
9289
93-
//check props for button variations
94-
${props => (props.$inputType === 'message' ? InputMessage : '')}
95-
`;
96-
97-
const InputMessage = css`
98-
font-family: inherit;
99-
height: 13rem !important;
100-
border-radius: 1rem;
101-
102-
//media query mixins
10390
${m.desktop(css`
10491
border-radius: 1.5rem;
10592
`)}

0 commit comments

Comments
 (0)