From e8b66d8fcea497be8b1820cde8ec187383b70c60 Mon Sep 17 00:00:00 2001
From: eug-vs <eug-vs@keemail.me>
Date: Wed, 12 Aug 2020 03:27:24 +0300
Subject: feat: create basic drawer

---
 src/components/Drawer/UserInfo.tsx | 38 ++++++++++++++++++++++++++++++++++++++
 1 file changed, 38 insertions(+)
 create mode 100644 src/components/Drawer/UserInfo.tsx

(limited to 'src/components/Drawer/UserInfo.tsx')

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;
+
-- 
cgit v1.2.3

