-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Add copy to clipboard functionality #182
Conversation
883c6e9
to
dedf297
Compare
I made some progress. Basically the only thing left is how to handle the error case. The error message is big and won't look good if we use it as the button's text. Any ideas welcome 🙂 |
@mdo: thoughts? |
Looks good when it works! What's the long error message we have, and can it be shortened? |
What do you mean with "When it works"? When doesn't it work for you? :) The error message is https://github.com/twbs/icons/pull/182/files#diff-421b283055e51a6d67742686e9fdc865R88 In this case, I was thinking maybe just select the code and don't show any error. Or we have a new paragraph/div bellow the snippet and we show it in case of an error? You can experiment with this by changing the error handler https://github.com/twbs/icons/pull/182/files#diff-421b283055e51a6d67742686e9fdc865R86 to |
52276b4
to
babfb5a
Compare
I pushed a patch for the error case. To try it, just change |
Do we still need Clipboard.js? Can't we just rely on native js? |
I'd rather keep it. The discussion here is about the styles mostly not what
we will use behind the scenes.
…On Sun, Apr 5, 2020, 11:33 Martijn Cuppens ***@***.***> wrote:
Do we still need Clipboard.js? Can't we just rely on native js?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#182 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AACVLNORSU5HZCSZTWWK45LRLA65FANCNFSM4LTKFZNQ>
.
|
I guess we could try showing when copying over the SVGs. PRs welcome and please open a new issue to track the request. |
TODO:
btn-clipboard
text on successFixes #3.
Preview: https://deploy-preview-182--bootstrap-icons.netlify.com/