MCPcopy Create free account
hub / github.com/WebDevSimplified/react-multistep-form / AddressForm

Function AddressForm

src/AddressForm.tsx:14–54  ·  view source on GitHub ↗
({
  street,
  city,
  state,
  zip,
  updateFields,
}: AddressFormProps)

Source from the content-addressed store, hash-verified

12}
13
14export function AddressForm({
15 street,
16 city,
17 state,
18 zip,
19 updateFields,
20}: AddressFormProps) {
21 return (
22 <FormWrapper title="Address">
23 <label>Street</label>
24 <input
25 autoFocus
26 required
27 type="text"
28 value={street}
29 onChange={e => updateFields({ street: e.target.value })}
30 />
31 <label>City</label>
32 <input
33 required
34 type="text"
35 value={city}
36 onChange={e => updateFields({ city: e.target.value })}
37 />
38 <label>State</label>
39 <input
40 required
41 type="text"
42 value={state}
43 onChange={e => updateFields({ state: e.target.value })}
44 />
45 <label>Zip</label>
46 <input
47 required
48 type="text"
49 value={zip}
50 onChange={e => updateFields({ zip: e.target.value })}
51 />
52 </FormWrapper>
53 )
54}

Callers

nothing calls this directly

Calls 1

updateFieldsFunction · 0.85

Tested by

no test coverage detected