Skip to content

feat: add copy-to-clipboard button for code snippets - #38

Closed
AliMahmoudDev wants to merge 1 commit into
voidswift:mainfrom
AliMahmoudDev:feat/copy-clipboard-code
Closed

AliMahmoudDev wants to merge 1 commit into
voidswift:mainfrom
AliMahmoudDev:feat/copy-clipboard-code

Conversation

@AliMahmoudDev

Copy link
Copy Markdown
Contributor

Summary

Adds copy-to-clipboard functionality for code snippets throughout the app.

Changes

  • New CopyButton component with Clipboard API support and document.execCommand fallback
  • New CodeBlock and PreBlock wrapper components that show a copy button on hover
  • Copy icon transitions to a green checkmark for 2 seconds after successful copy
  • Integrated with ReactMarkdown on the insights page to add copy buttons to all code blocks

Closes #37

Add CopyButton, CodeBlock, and PreBlock components with clipboard API
support and fallback for older browsers. Copy icon transitions to a
checkmark on successful copy. Integrated with ReactMarkdown on the
insights page to show copy buttons on code blocks.

Closes voidswift#37
@github-actions

Copy link
Copy Markdown

This PR has been inactive for 4 days. @maintainer @contributor please review or push updates, otherwise it will be closed in 2 days.

@github-actions github-actions Bot added the stale label Sep 14, 2026
@github-actions

Copy link
Copy Markdown

This PR was closed due to inactivity.

@github-actions github-actions Bot closed this Sep 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: add copy-to-clipboard button for code snippets

1 participant