Feature: Having a copy button next to the code sample
Manuel-Suarez-Abascal opened this issue · 2 comments
Description:
This proposal is to add a "Copy" button to the top-right corner of code sample boxes in the official documentation. The button's text should change to "Copied" when clicked, allowing the user to paste the copied code wherever they like. An example of this can be seen in the VueJS documentation.
UAT:
Given
: A Copy button is displayed in the top-right corner of the code sample boxes.
When
: a user clicks on the button its text should change to Copied.
Then
: the user can paste the copied code anywhere he/she wants.
Please let me know if this proposal is clear and if there are any additional details that need to be included. Thanks!
Visual example from VueJS docs:
Screen.Recording.2022-12-15.at.9.01.47.AM.mov
@iamkun I'm willing to take on this issue. Please let me know if there are any specific implementation requirements that I need to follow.
looks cool, pr is welcomed 😁