[Bug]: CopyButton needs tooltipAlignment and tooltipPosition functionality #10518
Closed
2 tasks done
Labels
component: copy-button
role: dev 🤖
severity: 4
https://ibm.biz/carbon-severity
type: bug 🐛
version: 10
Issues pertaining to Carbon v10
Package
carbon-components-react
Browser
Chrome
Package version
v7.51.0 (latest)
React version
v17.0.2
Description
When using the
CopyButton
component, thefeedback
tooltip seems to always be set to the bottom position, and center alignment.Example of issue:
If we use the
CopyButton
near the right-side of the page, after clicking the Copy button, a scrollbar appears because of the feedback tooltip being centered and pushing text even farther to the right side.A horizontal scrollbar appears because of the feedback tooltip.
Request is to allow developers using this component to pass-in the
tooltipAlignment
andtooltipPosition
fields so that we can avoid this from happening.Additional Request: It would also be nice to have a built-in tooltip for the hover-over as well
CodeSandbox example
https://codesandbox.io/s/nifty-sky-g5083?file=/src/index.js
Steps to reproduce
CopyButton
component near the right side of the pagefeedback
text to be fairly longCode of Conduct
The text was updated successfully, but these errors were encountered: