casesandberg / casesandberg/react-color

Propogate view from toggle button on ChromePicker

Open
#584 2 comments 0 reactions 0 assignees View on GitHub
enhancement help wanted
Dominant language
JavaScript
Stars
12.3k
Forks
920
PR merge metrics
No merged PRs in 30d

Description

The current view state of the ChromeFields input in ChromePicker is not externally accessible and makes it difficult to tie in with other components.

I suggest adding an onToggleView callback to pass the new "view" state as a parameter back up to its container.
e.g:
`if(this.props.onToggleView){
this.props.onToggleView('hex');
}`

propsfortogglebtn

Contributor guide

Open the contributing guide

Research direction

Start at the ChromePicker and ChromeFields components, then trace the toggle button that changes the current view. Add the requested onToggleView callback so the container receives the new view value, and verify that toggling views still works while the callback reports the selected view.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, react
Domain
frontend
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.