We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
TLDR; Tooltip requires forwardRef for custom react components to work. Icons don't use forwaredRef.
Use-case example (expected):
import CopyIcon from '@gravity-ui/icons/Copy'; import { Tooltip } from '@gravity-ui/uikit'; <Tooltip content={'Copy'}> <CopyIcon /> </Tooltip>
But it's not possible now, since icons don't use forwardRef.
The workaround for now is (Icon from uikit has forwadRef):
import CopyIcon from '@gravity-ui/icons/svgs/copy.svg'; import { Tooltip, Icon } from '@gravity-ui/uikit'; <Tooltip content={'Copy'}> <Icon data={CopyIcon} /> </Tooltip>
But it requires something like svgr for svg import to work and is more cumbersome.
The text was updated successfully, but these errors were encountered:
Successfully merging a pull request may close this issue.
TLDR; Tooltip requires forwardRef for custom react components to work. Icons don't use forwaredRef.
Use-case example (expected):
But it's not possible now, since icons don't use forwardRef.
The workaround for now is (Icon from uikit has forwadRef):
But it requires something like svgr for svg import to work and is more cumbersome.
The text was updated successfully, but these errors were encountered: