mirror of
https://github.com/tomru/pfadi-bussle.git
synced 2026-03-04 06:57:12 +01:00
move all wizard specific stuff to components/wizard
This commit is contained in:
85
components/wizard/contact.js
Normal file
85
components/wizard/contact.js
Normal file
@@ -0,0 +1,85 @@
|
||||
import React, { useContext } from 'react'
|
||||
import { WizardContext } from './context/wizardStore'
|
||||
import Required from './required'
|
||||
|
||||
export default function Contact() {
|
||||
const { state, onChangeEvent } = useContext(WizardContext)
|
||||
|
||||
const { name, email, street, zip, city } = state.formData
|
||||
|
||||
return (
|
||||
<>
|
||||
<div className="fsw">
|
||||
<div className="fs">
|
||||
<label className="flabel">
|
||||
Name <Required />
|
||||
</label>
|
||||
<input
|
||||
type="text"
|
||||
name="name"
|
||||
value={name}
|
||||
onChange={onChangeEvent}
|
||||
required
|
||||
className="input-text"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div className="fsw">
|
||||
<div className="fs">
|
||||
<label className="flabel">
|
||||
E-Mail <Required />
|
||||
</label>
|
||||
<input
|
||||
type="email"
|
||||
name="email"
|
||||
value={email}
|
||||
onChange={onChangeEvent}
|
||||
required
|
||||
className="input-text"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div className="fsw">
|
||||
<div className="fs">
|
||||
<label className="flabel">
|
||||
Straße <Required />
|
||||
</label>
|
||||
<input
|
||||
type="text"
|
||||
name="street"
|
||||
value={street}
|
||||
onChange={onChangeEvent}
|
||||
required
|
||||
className="input-text"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div className="fsw">
|
||||
<div className="fs">
|
||||
<label className="flabel">
|
||||
PLZ <Required />
|
||||
</label>
|
||||
<input
|
||||
type="text"
|
||||
name="zip"
|
||||
value={zip}
|
||||
onChange={onChangeEvent}
|
||||
required
|
||||
className="input-text"
|
||||
/>
|
||||
<label className="flabel">
|
||||
Stadt <Required />
|
||||
</label>
|
||||
<input
|
||||
type="text"
|
||||
name="city"
|
||||
value={city}
|
||||
onChange={onChangeEvent}
|
||||
required
|
||||
className="input-text"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</>
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user