Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Addon-controls: Expose presetColors for the color control #11606

Merged
merged 5 commits into from
Jul 19, 2020

Conversation

Orpheusp
Copy link
Contributor

@Orpheusp Orpheusp commented Jul 19, 2020

Issue: #10167

What I did

  • Exposed SketchPickerProps.presetColors for the color control component.
  • Stop click event propagation at the popup level, to give user the chance to click on the Hex input box and edit the color value this way. One side-effect of this change is that now the user will have to click on the color control button to close the color picker, instead of closing it automatically per mouse click.

How to test

  • Is this testable with Jest or Chromatic screenshots? No.
  • Does this need a new example in the kitchen sink apps? No.
  • Does this need an update to the documentation? Yes, included in this PR.

If your answer is yes to any of these, please make sure to include it in your PR.

@Orpheusp Orpheusp marked this pull request as ready for review July 19, 2020 02:19
Copy link
Member

@shilman shilman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great! Will test and merge later today. 🎉🎉🎉

@shilman shilman changed the title Expose SketchPickerProps.presetColors for the color control component Addon-controls: Expose presetColors for the color control component Jul 19, 2020
@shilman shilman changed the title Addon-controls: Expose presetColors for the color control component Addon-controls: Expose presetColors for the color control Jul 19, 2020
@shilman
Copy link
Member

shilman commented Jul 19, 2020

@Orpheusp made a couple minor changes:

  • capitalized story per our current naming convention
  • Tweaked the event propagation logic to restore the old behavior for clicks outside the input area

Great first contribution 👏 👏 👏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants