Components: Simplify CustomGradientPicker
's utility props
#49588
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.
What?
When recently migrating
CustomGradientPicker
to TypeScript, an abstraction was used that is more complicated than it needed to be. This PR simplifies the affected types.Why?
Simplifying these types will make them easier to parse and work with by other contributors in the future.
How?
The utility function impacted by this change uses only certain props from an existing type. The abstraction that is currently in place narrows the existing type to more closely match the expected inputs of the function, but this narrowing isn't technically necessary. To alleviate the added complexity, the types are being updated to just accept the existing type, and the extra prop(s) can be seamlessly ignored without causing any errors.
Testing Instructions