Trunc long names

This commit is contained in:
Deluan 2020-11-13 09:33:56 -05:00 committed by Joe Stump
parent dbb7eac94f
commit ab8933d430
No known key found for this signature in database
GPG Key ID: 29151C3EC48A0EB9

View File

@ -26,7 +26,14 @@ const useStyles = makeStyles((theme) => ({
height: theme.spacing(4),
},
username: {
marginTop: '-0.5em',
maxWidth: '11em',
marginTop: '-0.7em',
marginBottom: '-1em',
},
usernameWrap: {
whiteSpace: 'nowrap',
overflow: 'hidden',
textOverflow: 'ellipsis',
},
}))
@ -81,12 +88,12 @@ const UserMenu = (props) => {
<MenuList>
{loaded && (
<Card elevation={0} className={classes.username}>
<CardContent>
<CardContent className={classes.usernameWrap}>
<Typography variant={'button'}>{identity.fullName}</Typography>
</CardContent>
<Divider />
</Card>
)}
<Divider />
{Children.map(children, (menuItem) =>
isValidElement(menuItem)
? cloneElement(menuItem, {