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

Create v6 Slider with Styled System #404

Merged
merged 4 commits into from
Dec 14, 2020
Merged

Conversation

TyMick
Copy link
Collaborator

@TyMick TyMick commented Dec 4, 2020

Next stop on #378.

Slider didn't require too much updating: the only styleOverrides property being used was backgroundColor, to fix the background of inactive track when the slider is placed over a non-white backround. I just swapped that out with Styled System's backgroundColor/bg.

Also, since the main Box component is already receiving all the excess props, I added ...Box.propTypes to Slider's propTypes.

Would it be helpful if I restructured the TrackParts so that the blue background gradient stops at the thumb (correctly proportioning the gradient for the new stop point, maybe using Chroma.js) and we just give the inactive part of the track bg="transparent"? That way developers wouldn't have to worry about explicitly changing the background color prop when using Slider over a non-white background. Or is a white default background there still preferred (or the additional color scale computation too expensive)?

components/slider/component.jsx Outdated Show resolved Hide resolved
components/slider/component.jsx Outdated Show resolved Hide resolved
@korbinancell korbinancell merged commit a55a5f1 into Faithlife:master Dec 14, 2020
@RobertBolender RobertBolender mentioned this pull request Dec 22, 2020
40 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants