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

Add copy to clipboard to code examples #3

Merged
merged 2 commits into from
Nov 29, 2021
Merged

Conversation

merelinguist
Copy link
Collaborator

This is my first commit to trpc I hope it’s okay!

Adds a copy button on code examples.

Screenshot 2021-11-29 at 19 42 48

@vercel
Copy link

vercel bot commented Nov 29, 2021

@merelinguist is attempting to deploy a commit to the trpc Team on Vercel.

A member of the Team first needs to authorize it.

@vercel
Copy link

vercel bot commented Nov 29, 2021

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/trpc/kitchen-sink/ABGSVRa1jmW5Tw7w4mV8jZ8oPQfh
✅ Preview: https://kitchen-sink-git-fork-merelinguist-clipboard.tmp.trpc.io

@KATT
Copy link
Member

KATT commented Nov 29, 2021

Wow, thank you @merelinguist!! 🙏 🙏

@KATT
Copy link
Member

KATT commented Nov 29, 2021

Looks great!

Copy link
Member

@KATT KATT left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Major browser seem to have support for the clipboard API, could we possibly use that?

https://caniuse.com/?search=clipboard

package.json Outdated Show resolved Hide resolved
src/utils/useClipboard.ts Outdated Show resolved Hide resolved
src/utils/useClipboard.ts Outdated Show resolved Hide resolved
@KATT
Copy link
Member

KATT commented Nov 29, 2021

You're added as a contributor so if you feel like doing more stuff, you can make branches easier :)

@merelinguist
Copy link
Collaborator Author

Major browser seem to have support for the clipboard API, could we possibly use that?

https://caniuse.com/?search=clipboard

Done :)

@KATT KATT enabled auto-merge (squash) November 29, 2021 22:13
@KATT KATT disabled auto-merge November 29, 2021 22:14
@KATT KATT merged commit b90230b into trpc:main Nov 29, 2021
@merelinguist merelinguist deleted the clipboard branch November 29, 2021 22:14
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.

2 participants