Skip to content

Commit 066694a

Browse files
subhajit20kylemh
andauthored
Replaced all the css into tailwind css on RegistrationForm component (#1780)
Co-authored-by: Kyle Holmberg <kylemh.email@gmail.com>
1 parent ce3892e commit 066694a

File tree

3 files changed

+18
-67
lines changed

3 files changed

+18
-67
lines changed

components/Forms/RegistrationForm/RegistrationForm.js

Lines changed: 9 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ import Input from 'components/Form/Input/Input';
1515
import Alert from 'components/Alert/Alert';
1616
import Link from 'next/link';
1717
import OutboundLink from 'components/OutboundLink/OutboundLink';
18-
import styles from './RegistrationForm.module.css';
1918

2019
export const PASSWORD_FOR_EVERYBODY = 'nOnEeDfOrP@ssw0rd!';
2120

@@ -115,7 +114,7 @@ function RegistrationForm({ initialValues, onSubmit, onSuccess }) {
115114
validationSchema={registrationSchema}
116115
>
117116
{({ isSubmitting }) => (
118-
<Form className={styles.RegistrationForm}>
117+
<Form className="w-full flex items-center flex-col [&>p]:my-5 [&>p]:mx-auto">
119118
<p>
120119
We work closely with military veterans, service members, and spouses who are passionate
121120
about transitioning into the tech industry. We work with over 7,000 members who are all
@@ -126,7 +125,7 @@ function RegistrationForm({ initialValues, onSubmit, onSuccess }) {
126125
</Link>
127126
</p>
128127

129-
<div className={styles.formContainer}>
128+
<div className="flex flex-col justify-between max-w-lg w-full">
130129
<Field
131130
type="email"
132131
name="email"
@@ -146,7 +145,7 @@ function RegistrationForm({ initialValues, onSubmit, onSuccess }) {
146145
/>
147146

148147
<Field
149-
className={styles.invisible}
148+
className="hidden"
150149
type="password"
151150
name="password"
152151
label="Password*"
@@ -156,7 +155,7 @@ function RegistrationForm({ initialValues, onSubmit, onSuccess }) {
156155
/>
157156

158157
<Field
159-
className={styles.invisible}
158+
className="hidden"
160159
type="password"
161160
name="confirm-password"
162161
label="Confirm Password*"
@@ -215,24 +214,19 @@ function RegistrationForm({ initialValues, onSubmit, onSuccess }) {
215214

216215
{errorMessage && <Alert type="error">{errorMessage}</Alert>}
217216

218-
<hr className={styles.seperator} />
217+
<hr className="my-8 mx-0 w-1/4" />
219218

220-
<p className={styles.aside}>
219+
<p className="bg-white border-1 border-solid border-secondary rounded-md text-sm py-2 px-3">
221220
The demographic information you provide, helps us understand our community needs, ensure
222221
diversity, and provide specific resources to reach our mission. Thank you in advance for
223222
providing honest answers.
224223
<br />
225-
<span className={styles.bold}>We do not sell your information to anyone.</span>
224+
<span className="font-bold">We do not sell your information to anyone.</span>
226225
</p>
227226

228-
<hr className={styles.seperator} />
227+
<hr className="my-8 mx-0 w-1/4" />
229228

230-
<Button
231-
className={styles.topMargin}
232-
type="submit"
233-
theme="secondary"
234-
disabled={isSubmitting}
235-
>
229+
<Button className="mt-4" type="submit" theme="secondary" disabled={isSubmitting}>
236230
Submit
237231
</Button>
238232
</Form>

components/Forms/RegistrationForm/RegistrationForm.module.css

Lines changed: 0 additions & 43 deletions
This file was deleted.

components/Forms/RegistrationForm/__tests__/__snapshots__/RegistrationForm.test.js.snap

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
exports[`RegistrationForm should render with required props 1`] = `
44
<form
5-
className="RegistrationForm"
5+
className="w-full flex items-center flex-col [&>p]:my-5 [&>p]:mx-auto"
66
noValidate={true}
77
onReset={[Function]}
88
onSubmit={[Function]}
@@ -19,7 +19,7 @@ exports[`RegistrationForm should render with required props 1`] = `
1919
</a>
2020
</p>
2121
<div
22-
className="formContainer"
22+
className="flex flex-col justify-between max-w-lg w-full"
2323
>
2424
<div
2525
className="field"
@@ -78,7 +78,7 @@ exports[`RegistrationForm should render with required props 1`] = `
7878
</div>
7979
</div>
8080
<div
81-
className="invisible field"
81+
className="hidden field"
8282
data-testid="INPUT"
8383
>
8484
<label
@@ -106,7 +106,7 @@ exports[`RegistrationForm should render with required props 1`] = `
106106
</div>
107107
</div>
108108
<div
109-
className="invisible field"
109+
className="hidden field"
110110
data-testid="INPUT"
111111
>
112112
<label
@@ -259,24 +259,24 @@ exports[`RegistrationForm should render with required props 1`] = `
259259
</div>
260260
</div>
261261
<hr
262-
className="seperator"
262+
className="my-8 mx-0 w-1/4"
263263
/>
264264
<p
265-
className="aside"
265+
className="bg-white border-1 border-solid border-secondary rounded-md text-sm py-2 px-3"
266266
>
267267
The demographic information you provide, helps us understand our community needs, ensure diversity, and provide specific resources to reach our mission. Thank you in advance for providing honest answers.
268268
<br />
269269
<span
270-
className="bold"
270+
className="font-bold"
271271
>
272272
We do not sell your information to anyone.
273273
</span>
274274
</p>
275275
<hr
276-
className="seperator"
276+
className="my-8 mx-0 w-1/4"
277277
/>
278278
<button
279-
className="Button topMargin secondary"
279+
className="Button mt-4 secondary"
280280
data-testid="BUTTON"
281281
disabled={false}
282282
onClick={[Function]}

0 commit comments

Comments
 (0)