aboutsummaryrefslogtreecommitdiff
path: root/src/components/Drawer/UserInfo.tsx
diff options
context:
space:
mode:
authorEugene Sokolov <eug-vs@keemail.me>2020-08-12 03:41:48 +0300
committerGitHub <noreply@github.com>2020-08-12 03:41:48 +0300
commit2dc5fc00347256982136deea98d483c444002595 (patch)
treebb3826d74842bc628d1c6aa9c43aae919faffcea /src/components/Drawer/UserInfo.tsx
parent94067ef2a0d9ac5c2aa5f45eca5366a2251ac04a (diff)
parent68c7660e13fc5613ef26de752bc360a792b3f935 (diff)
downloadwhich-ui-2dc5fc00347256982136deea98d483c444002595.tar.gz
Merge pull request #77 from which-ecosystem/redesign
Mobile search and basic drawer
Diffstat (limited to 'src/components/Drawer/UserInfo.tsx')
-rw-r--r--src/components/Drawer/UserInfo.tsx38
1 files changed, 38 insertions, 0 deletions
diff --git a/src/components/Drawer/UserInfo.tsx b/src/components/Drawer/UserInfo.tsx
new file mode 100644
index 0000000..027f076
--- /dev/null
+++ b/src/components/Drawer/UserInfo.tsx
@@ -0,0 +1,38 @@
+import React from 'react';
+import { Typography } from '@material-ui/core';
+import { makeStyles } from '@material-ui/core/styles';
+import { User } from 'which-types';
+
+import Avatar from '../Avatar/Avatar';
+
+interface PropTypes {
+ user: User;
+}
+
+const useStyles = makeStyles(theme => ({
+ root: {
+ padding: theme.spacing(4, 10),
+ textAlign: 'center'
+ },
+ avatar: {
+ width: theme.spacing(14),
+ height: theme.spacing(14)
+ }
+}));
+
+
+const UserInfo: React.FC<PropTypes> = React.memo(({ user }) => {
+ const classes = useStyles();
+
+ return (
+ <div className={classes.root}>
+ <Avatar user={user} className={classes.avatar} />
+ <Typography variant="h5">
+ {user.username}
+ </Typography>
+ </div>
+ );
+});
+
+export default UserInfo;
+