File tree Expand file tree Collapse file tree 2 files changed +67
-1
lines changed Expand file tree Collapse file tree 2 files changed +67
-1
lines changed Original file line number Diff line number Diff line change
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
+ }
Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ import Box from "@mui/joy/Box";
3
3
import Stack from "@mui/joy/Stack" ;
4
4
import Typography from "@mui/joy/Typography" ;
5
5
import { Button } from "./components/Button" ;
6
+ import AddressForm from "./components/AddressForm" ;
6
7
7
8
export default function Home ( ) {
8
9
return (
@@ -28,7 +29,7 @@ export default function Home() {
28
29
p : 2 ,
29
30
} }
30
31
>
31
- < pre > TODO: Address Form </ pre >
32
+ < AddressForm / >
32
33
</ Box >
33
34
< Box sx = { { width : "100%" , display : "flex" , justifyContent : "flex-end" } } >
34
35
< Button
You can’t perform that action at this time.
0 commit comments