Open
Description
openedon Jan 19, 2022
As stated originally in #37599, it would be nice if the GradientPicker
component allowed its consumers to pass a custom ColorPicker
to be used instead of the default one. This would also, for example, allow the enhancements proposed in #38065 to be applied to the GradientPicker
as well.
Currently, that is not possible since the ColorPicker
is imported privately by one of the descendent components of GradientPicker
:
GradientPicker
+-> CustomGradientPicker
+-> CustomGradientBar
+-> ControlPoints.InsertPoint
+-> ColorPicker
The easiest solution would be to expose a render prop on GradientPicker
and propagate it (prop drilling) all the way down the chain, although it'd be interesting to investigate any other options that would result in a "cleaner" code.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Metadata
Assignees
Labels
WordPress component systemWordPress component system/packages/components/packages/componentsA suggestion for improvement.A suggestion for improvement.