Closed ryannmedina closed 4 years ago
This is a great contribution @ryannmedina! My only suggestion would be that we make the hover functionality opt-out rather than opt-in, so as not to change existing implementations.
Good suggestion @znicholasbrown! I just changed it. Let me know your thoughts.
The only thing I'm not super happy about is using a couple of important
declarations in the CSS. Seemed unavoidable.
Looks good! Because the css block is scoped to this component, I think having important
declarations is fine.
Hi Nicholas! We're working on a documentation project and needed this copy button to remain static (instead of only showing when a user hovers over the code). I added the 'onHover' option/setting to allow users the choice. Hope that's helpful!