-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
refactor(CopyButton): inherit Copy component #5006
refactor(CopyButton): inherit Copy component #5006
Conversation
Deploy preview for the-carbon-components ready! Built with commit c90d77e https://deploy-preview-5006--the-carbon-components.netlify.com |
Deploy preview for carbon-components-react ready! Built with commit c90d77e https://deploy-preview-5006--carbon-components-react.netlify.com |
Deploy preview for carbon-elements failed. Built with commit c90d77e https://app.netlify.com/sites/carbon-elements/deploys/5e1ca37f2856660008cfb156 |
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.
01f356e
to
24b2b66
Compare
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.
LGTM 👍
* refactor(CopyButton): inherit Copy component * refactor(code-snippet): unnest rules * test(CopyButton): full mount for button props test * docs(CodeSnippet): change default story feedback text
Closes #5005
this PR refactors the
<CopyButton>
to directly inherit<Copy>
. neither component is exported but the component only differs in that<Copy>
appears to only be used in inline code snippets, and<CopyButton>
is used for the other code snippet variants. since the behavior is identical it can all be contained in<Copy>
Changelog
Changed
Testing / Reviewing
Ensure the CopyButton and code snippet variants function as expected