Skip to content

Commit

Permalink
fix: show ellipsis for extra long link
Browse files Browse the repository at this point in the history
  • Loading branch information
jials committed Oct 10, 2020
1 parent 828213b commit e93eb4e
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,12 @@ const useStyles = makeStyles((theme) => {
textTransform: 'capitalize',
},
shortUrl: {
width: 'calc(100% - 32px)',
[theme.breakpoints.up('md')]: {
maxWidth: '400px',
},
[theme.breakpoints.down('sm')]: {
width: 'calc(100% - 32px)',
},
whiteSpace: 'nowrap',
overflow: 'hidden',
textOverflow: 'ellipsis',
Expand Down Expand Up @@ -203,9 +208,11 @@ export default function EnhancedTableBody() {
<TableCell align="left" className={classes.urlCell}>
<Grid container direction="column">
<Grid item className={classes.shortUrlGrid}>
<Tooltip title={row.shortUrl} placement="top-start" arrow>
<Typography variant="h6" className={classes.shortUrl}>
/{row.shortUrl}
</Typography>
</Tooltip>
</Grid>
<Hidden smDown>
<Grid item className={classes.longUrlGrid}>
Expand Down

0 comments on commit e93eb4e

Please sign in to comment.