Skip to content

[EuiColorStops] Allow passing props to value input in color stop popover #4587

@flash1293

Description

@flash1293

In the color stops popover the value input in the popover is controlled by the color stop component.

However, in some cases it would be nice to be able to change the appearance in some ways, like defining prepend and append, like in these mockups of the Lens color palette builder:
Screenshot 2021-03-01 at 10 41 22
Screenshot 2021-03-01 at 10 41 25

API Suggestion

Add

inputProps?: Partial<EuiInputProps>;

To the properties of the color stops component - if these are set, they are used as the default before the specific props are set in https://github.com/elastic/eui/blob/master/src/components/color_picker/color_stops/color_stop_thumb.tsx#L342 - this means props like readOnly, value and onChange are not configurable this way.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions