make copy icon align with id

This commit is contained in:
Peizhi Zheng
2022-01-14 21:07:18 -08:00
parent d44b8e2f32
commit c1b7fa09c6
6 changed files with 63 additions and 30 deletions

View File

@@ -317,9 +317,9 @@ const useRowStyles = makeStyles((theme) => ({
cursor: "pointer",
"&:hover": {
boxShadow: theme.shadows[2],
copyButton: {
display: "inline-block"
},
},
"&:hover $copyButton": {
display: "inline-block"
},
"&:hover .MuiTableCell-root": {
borderBottomColor: theme.palette.background.paper,
@@ -337,7 +337,11 @@ const useRowStyles = makeStyles((theme) => ({
},
copyButton: {
display: "none"
},
},
IdGroup: {
display: "flex",
alignItems: "center",
}
}));
interface RowProps {
@@ -375,7 +379,8 @@ function Row(props: RowProps) {
/>
</IconButton>
</TableCell>
<TableCell component="th" scope="row" className={classes.idCell} >
<TableCell component="th" scope="row" className={classes.idCell}>
<div className={classes.IdGroup}>
{uuidPrefix(task.id)}
<Tooltip title="Copy text to clipboard">
<IconButton
@@ -390,6 +395,7 @@ function Row(props: RowProps) {
<FileCopyOutlinedIcon fontSize="small" style={{ height: "12px", width: "12px" }} />
</IconButton>
</Tooltip>
</div>
</TableCell>
<TableCell>{task.type}</TableCell>
<TableCell>