"Copy Text" component #1553
-
Hello team, there's a component in the roadmap that is described as "a pattern for copying text to clipboard." Our team has been using a component built in antd to implement this pattern, but now that we've been moving more things to Paste it might be a good time to get any feedback on it, or features we've overlooked. For a11y, i used https://codesandbox.io/s/copybox-implementation-0v74c?file=/sandbox.config.json I'm having some kind of codesandbox permission error when copying using the Clipboard API, but you can at least kind of get a sense of how it would work by seeing the error toast 😅 |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 3 replies
-
Hey @vnguyen94. This is great. Thanks for putting this together and sharing. It's really amazing to see what you've come up with Paste. Some initial feedback:
Overall I think this is a great start. I'm sharing with the rest of the team to gather more feedback. |
Beta Was this translation helpful? Give feedback.
-
I chatted with the team a bit, and have a couple more suggestions:
I took a pass on a revised version that uses The copy part isn't quite working, but I wonder if that has to do with CodeSandbox. Let me know what you think of that concept, and if you're on board we can keep iterating on it. Maybe you'd be up to contributing it to Paste. |
Beta Was this translation helpful? Give feedback.
-
Courtesy of @vnguyen94, we now have a library for copying to clipboard in Paste. We still need to create some docs, but you can view the stories on our hosted Storybook instance. |
Beta Was this translation helpful? Give feedback.
Courtesy of @vnguyen94, we now have a library for copying to clipboard in Paste. We still need to create some docs, but you can view the stories on our hosted Storybook instance.