Skip to content

Commit

Permalink
topicPanel: copy topic type on double click
Browse files Browse the repository at this point in the history
  • Loading branch information
atiderko committed Apr 3, 2024
1 parent 5604d92 commit dd35d34
Showing 1 changed file with 12 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -147,8 +147,18 @@ const TopicTreeItem = React.forwardRef(function TopicTreeItem(
}}
>
{labelInfo && (
<Typography variant="caption" color="inherit" padding={0.5}>
[{labelInfo}]
<Typography
variant="caption"
color="inherit"
padding={0.5}
onClick={(e) => {
if (e.detail === 2) {
navigator.clipboard.writeText(labelInfo);
logCtx.success(`${labelInfo} copied!`);
}
}}
>
{labelInfo}
</Typography>
)}
{labelCount > 0 && (
Expand Down

0 comments on commit dd35d34

Please sign in to comment.