-
-
Notifications
You must be signed in to change notification settings - Fork 32.5k
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
[Tooltip] Migrate to emotion #24571
[Tooltip] Migrate to emotion #24571
Conversation
@material-ui/core: parsed: +0.26% , gzip: +0.21% |
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.
See the comment regarding the overridesResolver
. Let me know if you are willing to take a look on this or if you need more help
const overridesResolver = (props, styles) => { | ||
const { styleProps } = props; | ||
|
||
return deepmerge(styles.popper || {}, { |
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.
As this component does not have a Root
I would recommend creating two separate components TooltipPopper
- you already have this one, and one wrapper for the children
that will have the classes related to the tooltip
. With that we will create two overridesResolver
functions, once for each. At this moment I don't have better idea for solving this component. Cc @oliviertassinari
PS: The overrides resolver just spreads these styles on the root
element, which in this case does not exists, that's why we need two separate overrides resolvers for this component.
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.
and one wrapper for the children
I don't follow the use case. From what I understand, we don't need to apply styles to the children. The component has no root.
009c7eb
to
4559fe3
Compare
fix build and regressions
4afaaae
to
41666f2
Compare
@vinyldarkscratch Thanks! |
This PR migrates the
Tooltip
component to the new emotion format as a part of #24405.