mirror of
https://github.com/zed-industries/zed.git
synced 2026-05-27 08:34:11 +00:00
There were several places adding a copy icon button, so thought of encapsulating the logic to copy a given string into the clipboard (and other small details like swapping the icon and tooltip if copied) into a component, making it easier to introduce this sort of functionality in the future, with fewer lines of code. All it takes (for the simplest case) is: ```rs CopyButton::new(your_message) ``` <img width="600" height="714" alt="Screenshot 2025-12-29 at 10 50@2x" src="https://github.com/user-attachments/assets/e6949863-a056-4855-82d8-e4ffb5d62c90" /> Release Notes: - N/A |
||
|---|---|---|
| .. | ||
| src | ||
| Cargo.toml | ||
| LICENSE-GPL | ||