Trunc long names

This commit is contained in:
Deluan
2020-11-13 09:33:56 -05:00
parent 3dac9ae666
commit 48e0d2c99e
+10 -3
View File
@@ -26,7 +26,14 @@ const useStyles = makeStyles((theme) => ({
height: theme.spacing(4), height: theme.spacing(4),
}, },
username: { 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> <MenuList>
{loaded && ( {loaded && (
<Card elevation={0} className={classes.username}> <Card elevation={0} className={classes.username}>
<CardContent> <CardContent className={classes.usernameWrap}>
<Typography variant={'button'}>{identity.fullName}</Typography> <Typography variant={'button'}>{identity.fullName}</Typography>
</CardContent> </CardContent>
<Divider />
</Card> </Card>
)} )}
<Divider />
{Children.map(children, (menuItem) => {Children.map(children, (menuItem) =>
isValidElement(menuItem) isValidElement(menuItem)
? cloneElement(menuItem, { ? cloneElement(menuItem, {