Skip to content

Commit

Permalink
adds copied text to copy icon
Browse files Browse the repository at this point in the history
  • Loading branch information
thecurioussailor committed Aug 19, 2024
1 parent 5569b89 commit b8e7fdd
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions apps/web/components/CodeBlock.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ export default function CodeBlock({ block }: { block: any }) {
}}
>
{showCopiedMessage ? <CopyTick /> : <CopyIcon />}
{showCopiedMessage && <p className="absolute border p-1 text-xs bg-gray-500 text-slate-100 rounded-sm right-7 top-1 z-10">Copied!</p>}
</button>
</div>
<div className="max-w-full overflow-auto relative">
Expand Down

0 comments on commit b8e7fdd

Please sign in to comment.