summaryrefslogtreecommitdiff
path: root/client/src/pages/Enrollment/FormTwo/FormTwo.jsx
blob: 91d8f6b3d9649243b5087f25be063831010f468a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
import React from 'react'
import Input from '../../../components/Input/Input'
import Header from '../../../components/Header/Header'
import SubmitButton from '../../../components/SubmitButton/SubmitButton'

const FormTwo = ({ formData, setFormData }) => {
  return (
    <div className="formtwo">
      <Header subheading="Enrollment" />
      <Input
        id="mobile"
        value={formData.mobile}
        label="Mobile"
        type="text"
        onChange={(e) => {
          setFormData({
            ...formData,
            mobile: e.target.value
          })
        }}
        placeholder="Enter your Mobile Number"
        pattern="[0-9]+"
        maxLength="10"
        minLength="10"
      />
      <Input
        id="email"
        value={formData.email}
        label="Email"
        type="email"
        onChange={(e) => {
          setFormData({
            ...formData,
            email: e.target.value
          })
        }}
        placeholder="Enter your Email ID"
        pattern="[a-z0-9._%+-]+@[a-z0-9.-]+\.[a-z]{2,4}$"
      />
      <SubmitButton />
    </div>
  )
}

export default FormTwo