-
Notifications
You must be signed in to change notification settings - Fork 71
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
Update Copyable UI #1656
Update Copyable UI #1656
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
src/lib/holocene/copyable.svelte
Outdated
on:click={(e) => copy(e, content)} | ||
> | ||
<slot> | ||
<span class={$$props.class} class:select-all={!$$slots.default} | ||
>{content}</span | ||
> | ||
</slot> | ||
<IconButton | ||
<button | ||
on:click={(e) => copy(e, content)} |
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.
Should we just have a CopyButton component?
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.
Yeah, was just talking with @tigernaut about this. I think probably? Added ✅ But we likely need to have a bigger discussion of if we want this and IconButton
to be variants of the Button
component.
fa49601
to
93f6da3
Compare
* Make copyable UI similar to copy button in CodeBlock * Fix truncation in links without icons * Update snap * Create CopyButton component
Description & motivation 💭
Updates
Copyable
component to look more like the copy button in theCodeBlock
component so that it doesn't take up as much height and isn't clipped.Fixes truncation on links without an icon.
Creates reusable
/copyable/button.svelte
used in theCopyable
andCodeBlock
component.Screenshots (if applicable) 📸
Design Considerations 🎨
Testing 🧪
How was this tested 👻
Steps for others to test: 🚶🏽♂️🚶🏽♀️
Checklists
Draft Checklist
Merge Checklist
Issue(s) closed
Docs
Any docs updates needed?