casesandberg / casesandberg/react-color
Propogate view from toggle button on ChromePicker
- 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');
}`
Contributor 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