[internal] Update slot components to use overridesResolver part 1#25853
Merged
mnajdova merged 4 commits intoApr 21, 2021
Conversation
mnajdova
commented
Apr 20, 2021
| const { styleProps } = props; | ||
|
|
||
| return { | ||
| [`& .${accordionClasses.region}`]: styles.region, |
Member
Author
There was a problem hiding this comment.
There is no component for this one.
mnajdova
commented
Apr 20, 2021
| const overridesResolver = (props, styles) => { | ||
| return deepmerge( | ||
| { | ||
| [`& .${avatarGroupClasses.avatar}`]: styles.avatar, |
Member
Author
There was a problem hiding this comment.
This is a good example where this approach may not work everywhere. In this case we need to still keep this, otherwise it won't work.
mnajdova
commented
Apr 20, 2021
Comment on lines
+71
to
+79
| [`& .${autocompleteClasses.tag}`]: { | ||
| ...styles.tag, | ||
| ...styles[`tagSize${capitalize(size)}`], | ||
| }, | ||
| [`& .${autocompleteClasses.inputRoot}`]: styles.inputRoot, | ||
| [`& .${autocompleteClasses.input}`]: { | ||
| ...styles.input, | ||
| ...(inputFocused && styles.inputFocused), | ||
| }, |
Member
Author
There was a problem hiding this comment.
There are no slot components for these overrides keys, so we need to keep them
mnajdova
marked this pull request as ready for review
April 20, 2021 15:51
Member
Author
👍 ok let's continue with the rest of the components. |
This was referenced Apr 22, 2021
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR updates the components starting with
Ato useoverridesResolverper slot component. (need to somehow batch the changes in few PRs, otherwise the PR would be too big).I am disabling the
testDeepOverridesas we no longer support it. In some cases we still need to define the overrides on the root, for example in theAvatarGroup, when we are just applying the classes on a component down the tree, which is not created by astyled()utility.I've done some preliminary benchmark in #25850 and seems like perf are great with this approach.