[Bug]: CopyButton tooltip wrong styles and inconsistent #10524
Labels
component: copy-button
severity: 4
https://ibm.biz/carbon-severity
status: waiting for author's response 💬
type: bug 🐛
Package
carbon-components-react
Browser
Chrome
Package version
v7.51.0 (latest)
React version
v17.0.2
Description
When hovering over the
CopyButton
, the tooltip that appears on the icon is different from the one fromButton
.Both are considered "Buttons" (but implemented differently) and with icons, and it would be expected that the
iconDescription
should operate the same.But instead, when hovering over a
CopyButton
, it uses i think the html version of a tooltip.. It should be using carbon's tooltip instead.I am not able to do a screenshot of this tooltip in windows, so this screenshot is from mac instead. On my mac, it is currently set to Dark mode possibly why this tooltip has a darker background. But in windows, this version of the tooltip has a background color that is more white.
So within this version of the tooltip, it is already inconsistent to our web application, because it depends on the OS/browser instead.
The feedback tooltip is correct, but the hover-over tooltip uses the wrong version and creates inconsistencies.
When using
Button
(hasIconOnly
flag on), you can set theiconDescription
and it will use the carbon's tooltip.The tooltip design, padding, color, etc.. all styles, timing, functionality are different here, but both
CopyButton
andButton
(with hasIconOnly) is still a button with an icon. It should be consistentSimply,
CopyButton
should re-use carbon's tooltip version (and allow tooltip configurations likeposition
andalignment
) would resolve all the above inconsistencies.CodeSandbox example
https://codesandbox.io/s/modest-ishizaka-ovn5p
Steps to reproduce
Create a
CopyButton
component, and add a string value toiconDescription
.Run application and mouse hover over the button. The tooltip will appear
Code of Conduct
The text was updated successfully, but these errors were encountered: