diff options
author | Eugene Sokolov <eug-vs@keemail.me> | 2020-08-12 03:41:48 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-08-12 03:41:48 +0300 |
commit | 2dc5fc00347256982136deea98d483c444002595 (patch) | |
tree | bb3826d74842bc628d1c6aa9c43aae919faffcea /src/components/Drawer/UserInfo.tsx | |
parent | 94067ef2a0d9ac5c2aa5f45eca5366a2251ac04a (diff) | |
parent | 68c7660e13fc5613ef26de752bc360a792b3f935 (diff) | |
download | which-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.tsx | 38 |
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; + |