forked from module-federation/module-federation-examples
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathProfilePage.js
More file actions
215 lines (209 loc) · 7.27 KB
/
ProfilePage.js
File metadata and controls
215 lines (209 loc) · 7.27 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
import React from "react";
// @material-ui/core components
import InputLabel from "@material-ui/core/InputLabel";
import { Container, Grid, makeStyles, Typography } from "@material-ui/core";
import { useServiceContext } from "shell/Service";
// core components
import GridItem from "./components/Grid/GridItem.js";
import GridContainer from "./components/Grid/GridContainer.js";
import CustomInput from "./components/CustomInput/CustomInput.js";
import Button from "./components/CustomButtons/Button.js";
import Card from "./components/Card/Card.js";
import CardHeader from "./components/Card/CardHeader.js";
import CardAvatar from "./components/Card/CardAvatar.js";
import CardBody from "./components/Card/CardBody.js";
import CardFooter from "./components/Card/CardFooter.js";
import avatar from "./assets/img/faces/zack.jpg";
const useStyles = makeStyles((theme) => ({
appBarSpacer: theme.mixins.toolbar,
content: {
flexGrow: 1,
height: "100vh",
overflow: "auto",
},
avatarPic: {
marginTop: "-10px",
},
container: {
paddingTop: theme.spacing(4),
paddingBottom: theme.spacing(4),
},
paper: {
padding: theme.spacing(2),
display: "flex",
flexDirection: "column",
overflow: "auto",
},
cardCategoryWhite: {
color: "rgba(255,255,255,.62)",
margin: "0",
fontSize: "14px",
marginTop: "0",
marginBottom: "0",
},
cardTitleWhite: {
color: "#FFFFFF",
marginTop: "0px",
minHeight: "auto",
fontWeight: "300",
fontFamily: "'Roboto', 'Helvetica', 'Arial', sans-serif",
marginBottom: "3px",
textDecoration: "none",
},
}));
export default function UserProfile() {
const classes = useStyles();
const serviceContext = useServiceContext();
React.useEffect(() => {
serviceContext.setService({ title: "Profile" });
}, []);
return (
<main className={classes.content}>
<div className={classes.appBarSpacer} />
<Container maxWidth="lg" className={classes.container}>
<Grid item xs={12}>
<GridContainer>
<GridItem xs={12} sm={12} md={8}>
<Card>
<CardHeader>
<Typography
component="h1"
variant="h6"
color="primary"
gutterBottom
>
Edit Profile
</Typography>
<Typography
component="p"
variant="subtitle1"
color="primary"
gutterBottom
>
Complete your profile
</Typography>
</CardHeader>
<CardBody>
<GridContainer>
<GridItem xs={12} sm={12} md={5}>
<CustomInput
labelText="Company (disabled)"
id="company-disabled"
formControlProps={{
fullWidth: true,
}}
inputProps={{
disabled: true,
}}
/>
</GridItem>
<GridItem xs={12} sm={12} md={3}>
<CustomInput
labelText="Username"
id="username"
formControlProps={{
fullWidth: true,
}}
/>
</GridItem>
</GridContainer>
<GridContainer>
<GridItem xs={12} sm={12} md={6}>
<CustomInput
labelText="First Name"
id="first-name"
formControlProps={{
fullWidth: true,
}}
/>
</GridItem>
<GridItem xs={12} sm={12} md={6}>
<CustomInput
labelText="Last Name"
id="last-name"
formControlProps={{
fullWidth: true,
}}
/>
</GridItem>
</GridContainer>
<GridContainer>
<GridItem xs={12} sm={12} md={4}>
<CustomInput
labelText="City"
id="city"
formControlProps={{
fullWidth: true,
}}
/>
</GridItem>
<GridItem xs={12} sm={12} md={4}>
<CustomInput
labelText="Country"
id="country"
formControlProps={{
fullWidth: true,
}}
/>
</GridItem>
<GridItem xs={12} sm={12} md={4}>
<CustomInput
labelText="Postal Code"
id="postal-code"
formControlProps={{
fullWidth: true,
}}
/>
</GridItem>
</GridContainer>
<GridContainer>
<GridItem xs={12} sm={12} md={12}>
<InputLabel style={{ color: "#AAAAAA" }}>
About me
</InputLabel>
<CustomInput
labelText="Lamborghini Mercy, Your chick she so thirsty, I'm in that two seat Lambo."
id="about-me"
formControlProps={{
fullWidth: true,
}}
inputProps={{
multiline: true,
rows: 5,
}}
/>
</GridItem>
</GridContainer>
</CardBody>
<CardFooter>
<Button color="primary">Update Profile</Button>
</CardFooter>
</Card>
</GridItem>
<GridItem xs={12} sm={12} md={4}>
<Card profile>
<CardAvatar profile>
<a href="#pablo" onClick={(e) => e.preventDefault()}>
<img src={avatar} className={classes.avatarPic} alt="..." />
</a>
</CardAvatar>
<CardBody profile>
<h6 className={classes.cardCategory}>PRINCIPAL ENGINEER</h6>
<h4 className={classes.cardTitle}>Zack Jackson</h4>
<p className={classes.description}>
Principal Engineer at lululemon <br />
Distributed JavaScript Orchestration at scale. Maintainer of
Webpack, inventor of Module Federation.
</p>
<Button color="primary" round>
Follow
</Button>
</CardBody>
</Card>
</GridItem>
</GridContainer>
</Grid>
</Container>
</main>
);
}