Trunc long names

This commit is contained in:
Deluan 2020-11-13 09:33:56 -05:00
parent 3dac9ae666
commit 48e0d2c99e
1 changed files with 10 additions and 3 deletions

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, {