Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle css class for copied state #2

Closed
wants to merge 1 commit into from
Closed

Handle css class for copied state #2

wants to merge 1 commit into from

Conversation

r3trofitted
Copy link

In addition to changing the target button's text, the Stimulus class copied can be used to give a visual feedback when copying to the clipboard.

If defined, the copied class is added when the content is copied, and removed when the original text is restored.

In addition to changing the target button's text, the Stimulus classes
`copy` and `copied` can be used to give a visual feedback when copying
to the clipboard.

If defined, the `copied` class is added when the content is copied, while
the `copy` class (once again, if defined) is removed. When the initial text
is restored, so are the CSS classes.
@r3trofitted r3trofitted changed the title Handle css classes for copy & copied states Handle css classes for copied states Sep 6, 2021
@r3trofitted r3trofitted changed the title Handle css classes for copied states Handle css class for copied state Sep 6, 2021
@r3trofitted r3trofitted closed this Sep 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant