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

feat(interactive): static className copy #1624

Merged
merged 4 commits into from Sep 26, 2022
Merged

Conversation

Flower-F
Copy link
Contributor

@Flower-F Flower-F commented Sep 22, 2022

@netlify
Copy link

netlify bot commented Sep 22, 2022

Deploy Preview for unocss ready!

Name Link
🔨 Latest commit 9276f45
🔍 Latest deploy log https://app.netlify.com/sites/unocss/deploys/63312293f24d9b0008be0ea7
😎 Deploy Preview https://deploy-preview-1624--unocss.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

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) {
Copy link
Member

Choose a reason for hiding this comment

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

How about use useclipboard?

Copy link
Contributor Author

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])" />
Copy link
Member

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.

@antfu antfu merged commit e6ef87b into unocss:main Sep 26, 2022
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

3 participants