Skip to content

Commit 95559d0

Browse files
committed
check icon, remove leftovers
1 parent d069c1e commit 95559d0

File tree

2 files changed

+10
-5
lines changed

2 files changed

+10
-5
lines changed

src/components/codeBlock/code-blocks.module.scss

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,6 @@
7575
}
7676

7777
:global(.highlight-line) {
78-
/* Set highlight bg color */
7978
border-left: 4px solid var(--brandPink);
8079
}
8180

src/components/codeHighlights/codeHighlights.tsx

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
'use client';
22

33
import {Children, cloneElement, ReactElement, useEffect, useRef, useState} from 'react';
4-
import {Clipboard} from 'react-feather';
4+
import {Check, Clipboard} from 'react-feather';
55
import styled from '@emotion/styled';
66
import * as Sentry from '@sentry/nextjs';
77

@@ -101,11 +101,17 @@ export function HighlightBlock({
101101
<HighlightBlockContainer>
102102
<CodeLinesContainer ref={codeRef}>{children}</CodeLinesContainer>
103103
<ClipBoardContainer onClick={copyCodeOnClick}>
104-
{showCopyButton && (
104+
{showCopyButton && !copied && (
105105
<Clipboard
106106
size={16}
107-
opacity={copied ? 1 : 0.15}
108-
stroke={copied ? 'green' : 'white'}
107+
opacity={0.15}
108+
stroke={"white"}
109+
/>
110+
)}
111+
{showCopyButton && copied && (
112+
<Check
113+
size={16}
114+
stroke={"green"}
109115
/>
110116
)}
111117
</ClipBoardContainer>

0 commit comments

Comments
 (0)