Skip to content

GradientPicker: allow custom ColorPicker #38066

Open

Description

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

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions