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

Support color changing on slider change #54

Open
asaf opened this issue Apr 9, 2017 · 3 comments
Open

Support color changing on slider change #54

asaf opened this issue Apr 9, 2017 · 3 comments

Comments

@asaf
Copy link

asaf commented Apr 9, 2017

Hey,

How hard would it be to support changing the color on slider value change?
For example starting green towards red color for severity indication,

Thanks.

@asaf asaf changed the title Support color changing during slider change Support color changing on slider change Apr 9, 2017
asaf added a commit to asaf/react-rangeslider that referenced this issue May 26, 2017
@whoisandy
Copy link
Owner

@asaf Could you post an example the above mentioned use case?

@asaf
Copy link
Author

asaf commented Jun 8, 2017

@whoisandy I described a use case in the issue, this patch let you change any fill style during rendering, code example to extract a color from a palette based on the current slider's value:

render() {
  const {value} = this.state
  const fillStyle = {'backgroundColor': COLORS[value]}
  return (
            <RangeSlidervalue={value} fillStyle={fillStyle}/>
  )
}

@asaf
Copy link
Author

asaf commented Oct 12, 2017

@whoisandy ping?

asaf added a commit to asaf/react-rangeslider that referenced this issue Nov 3, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants