Skip to content

Commit 2accf49

Browse files
wip
1 parent 87aa411 commit 2accf49

File tree

2 files changed

+67
-1
lines changed

2 files changed

+67
-1
lines changed
Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
import React from "react";
2+
import Box from "@mui/joy/Box";
3+
import FormControl from "@mui/joy/FormControl";
4+
import FormLabel from "@mui/joy/FormLabel";
5+
import FormHelperText from "@mui/joy/FormHelperText";
6+
import Input from "@mui/joy/Input";
7+
8+
export default function AddressForm() {
9+
return (
10+
<Box
11+
component="form"
12+
sx={{
13+
"& .MuiInput-root": { my: 2 },
14+
}}
15+
noValidate
16+
autoComplete="off"
17+
>
18+
<div>
19+
<FormControl>
20+
<FormLabel sx={{ color: "black" }}>Name</FormLabel>
21+
<FormHelperText>Please enter a name</FormHelperText>
22+
<Input
23+
required
24+
name="name"
25+
defaultValue=""
26+
placeholder="Enter a name"
27+
fullWidth
28+
/>
29+
</FormControl>
30+
<FormControl>
31+
<FormLabel sx={{ color: "#444" }}>Line 1</FormLabel>
32+
<Input
33+
required
34+
name="line1"
35+
defaultValue=""
36+
placeholder="Enter line 1"
37+
fullWidth
38+
sx={{ ml: 1 }}
39+
/>
40+
</FormControl>
41+
<FormControl>
42+
<FormLabel sx={{ color: "#000" }}>Line 2</FormLabel>
43+
<Input
44+
name="line2"
45+
defaultValue=""
46+
placeholder="Enter line 2"
47+
fullWidth
48+
sx={{ ml: 1 }}
49+
/>
50+
</FormControl>
51+
<FormControl>
52+
<FormLabel sx={{ color: "rgba(0, 0, 0, 0.9)" }}>Postcode</FormLabel>
53+
<Input
54+
required
55+
name="line1"
56+
defaultValue=""
57+
placeholder="Enter postcode"
58+
fullWidth
59+
sx={{ ml: 1 }}
60+
/>
61+
</FormControl>
62+
</div>
63+
</Box>
64+
);
65+
}

src/app/page.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import Box from "@mui/joy/Box";
33
import Stack from "@mui/joy/Stack";
44
import Typography from "@mui/joy/Typography";
55
import { Button } from "./components/Button";
6+
import AddressForm from "./components/AddressForm";
67

78
export default function Home() {
89
return (
@@ -28,7 +29,7 @@ export default function Home() {
2829
p: 2,
2930
}}
3031
>
31-
<pre>TODO: Address Form</pre>
32+
<AddressForm />
3233
</Box>
3334
<Box sx={{ width: "100%", display: "flex", justifyContent: "flex-end" }}>
3435
<Button

0 commit comments

Comments
 (0)