Skip to content
This repository was archived by the owner on May 13, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 6 additions & 8 deletions src/pages/Stream/Views/Explore/StaticLogRow.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ type LogRowProps = {
};

const CopyButton = (props: { fieldValue: any }) => {
const classes = tableStyles;
const [copied, setCopied] = useState(false);

useEffect(() => {
Expand All @@ -43,12 +44,8 @@ const CopyButton = (props: { fieldValue: any }) => {

return (
<Tooltip label={copied ? 'Copied' : 'Copy'} withArrow position="right">
<ActionIcon variant="subtle" onClick={handleCopyBtnClick}>
{copied ? (
<IconCheck size={12} style={{ backgroundColor: 'transparent', color: '#211F1F' }} stroke={1.5} />
) : (
<IconCopy size={12} style={{ backgroundColor: 'transparent', color: '#211F1F' }} stroke={1.5} />
)}
<ActionIcon className={classes.copyIcon} variant="subtle" onClick={handleCopyBtnClick}>
{copied ? <IconCheck size={12} stroke={1.5} /> : <IconCopy size={12} stroke={1.5} />}
</ActionIcon>
</Tooltip>
);
Expand Down Expand Up @@ -93,16 +90,17 @@ const LogRow: FC<LogRowProps> = (props) => {
return (
<td
key={`${header}-${logSchemaIndex}`}
style={{ position: 'relative' }}
onMouseEnter={() => handleMouseEnter(logIndex, logSchemaIndex)}
onMouseLeave={handleMouseLeave}>
<Group style={{ position: 'relative' }} wrap="nowrap">
<Group wrap="nowrap">
{parsedData}
{hoveredCell === `${logIndex}-${logSchemaIndex}` && (
<Stack
style={{
position: 'absolute',
right: '0',
background: '#f1f3f5',
background: 'transparent',
}}>
<CopyButton fieldValue={parsedData} />
</Stack>
Expand Down
7 changes: 7 additions & 0 deletions src/pages/Stream/styles/Logs.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -278,3 +278,10 @@
color: var(--mantine-color-gray-5);
cursor: pointer;
}

.copyIcon {
color: #211f1f;
}
.copyIcon:hover {
background-color: #f1f3f5;
}