rreusser / controls-state

⚙️ An object for managing state
https://observablehq.com/@rreusser/control-panel-2-prototype-test
21 stars 2 forks source link

Slider without any min and max options should also let you select higher values #3

Closed marcofugaro closed 5 years ago

marcofugaro commented 5 years ago

Hi! I guess the slider was designed with the options as a second argument was because they are optional, so If I do something like this

State.Slider(10)

or just

10

image

a slider with a default min and max would be created.

Now by default min is 0 and max is the value itself. However after using it I think it would be more useful if the default max would be the value * 2. As a user I often also want to increase the value.

I think this would be a more reasonable default, I am willing to do a PR if you agreee with me.

rreusser commented 5 years ago

Makes total sense. Agreed. If you'd like to file a PR it would be greatly appreciated! And I'd be glad to add you as a contributor to the project so that I don't hold you up. 🙇

marcofugaro commented 5 years ago

Sure! Thank you!