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

Passed in container style only applies to the slider, not the track #82

Open
danny-does-stuff opened this issue Aug 24, 2017 · 0 comments

Comments

@danny-does-stuff
Copy link

It is good that there are different options for style and trackStyle so that you can customize the slider more, but this causes some problems with styling. When you pass in style={{paddingTop: 8}}, The track will move down 8 units but the slider will remain in place, causing the slider to be off the track.

The expected behavior here would be if I pass positioning style into the style prop, the whole component is repositioned instead of only piece of it.

Workaround: wrap your Slider component in a View and apply the positioning style to the wrapper, like so:

<View style={{paddingTop: 8}}>
    <Slider {...mySliderProps} />
</View>
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

1 participant