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
feat(interactive): static className copy #1624
Conversation
✅ Deploy Preview for unocss ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
@@ -60,6 +60,15 @@ function getRegexperLink(regex: RegExp) { | |||
function getCsGitHubLink(key: RegExp | string, repo = 'unocss/unocss') { | |||
return `https://cs.github.com/?scope=${encodeURI(`repo:${repo}`)}&q="${encodeURIComponent(String(key))}"` | |||
} | |||
|
|||
function copyClassName(className: string) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about use useclipboard?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your advice
<code text-hex-AB5E3F dark:text-hex-C4704F>"{{ r[0] }}"</code> | ||
<div i-carbon-copy w-4 h-4 hover:op70 cursor-pointer title="copy" @click="copyClassName(r[0])" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The position and icon need antfu reviewed.
issue#1619