mirror of
https://github.com/tomru/pfadi-bussle.git
synced 2026-03-04 23:17:12 +01:00
move rest into pages
This commit is contained in:
84
pages/components/contact.js
Normal file
84
pages/components/contact.js
Normal file
@@ -0,0 +1,84 @@
|
||||
import { useContext } from 'react'
|
||||
import { WizardContext, ACTIONS } from '../context/wizardStore'
|
||||
import Required from './required'
|
||||
|
||||
import Form from 'react-bootstrap/Form'
|
||||
import Col from 'react-bootstrap/Col'
|
||||
|
||||
export default function Contact() {
|
||||
const { state, onChangeEvent } = useContext(WizardContext)
|
||||
|
||||
const { name, email, street, zip, city } = state.formData
|
||||
|
||||
return (
|
||||
<>
|
||||
<Form.Group>
|
||||
<Form.Label>
|
||||
Name <Required />
|
||||
</Form.Label>
|
||||
<Form.Control
|
||||
type="text"
|
||||
name="name"
|
||||
placeholder="Name"
|
||||
value={name}
|
||||
onChange={onChangeEvent}
|
||||
required
|
||||
/>
|
||||
</Form.Group>
|
||||
<Form.Group>
|
||||
<Form.Label>
|
||||
E-Mail <Required />
|
||||
</Form.Label>
|
||||
<Form.Control
|
||||
type="email"
|
||||
name="email"
|
||||
placeholder="E-Mail"
|
||||
value={email}
|
||||
onChange={onChangeEvent}
|
||||
required
|
||||
/>
|
||||
</Form.Group>
|
||||
<Form.Group>
|
||||
<Form.Label>
|
||||
Straße <Required />
|
||||
</Form.Label>
|
||||
<Form.Control
|
||||
type="text"
|
||||
name="street"
|
||||
placeholder="Straße"
|
||||
value={street}
|
||||
onChange={onChangeEvent}
|
||||
required
|
||||
/>
|
||||
</Form.Group>
|
||||
<Form.Row>
|
||||
<Form.Group as={Col} xs={4}>
|
||||
<Form.Label>
|
||||
PLZ <Required />
|
||||
</Form.Label>
|
||||
<Form.Control
|
||||
type="text"
|
||||
name="zip"
|
||||
placeholder="PLZ"
|
||||
value={zip}
|
||||
onChange={onChangeEvent}
|
||||
required
|
||||
/>
|
||||
</Form.Group>
|
||||
<Form.Group as={Col}>
|
||||
<Form.Label>
|
||||
Stadt <Required />
|
||||
</Form.Label>
|
||||
<Form.Control
|
||||
type="text"
|
||||
name="city"
|
||||
placeholder="Stadt"
|
||||
value={city}
|
||||
onChange={onChangeEvent}
|
||||
required
|
||||
/>
|
||||
</Form.Group>
|
||||
</Form.Row>
|
||||
</>
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user