added method to set thumb image

Summary: this change will allow the slider to have different thumb images .

Sets an image for the thumb. It only supports static images
Closes https://github.com/facebook/react-native/pull/3849

Reviewed By: svcscm

Differential Revision: D2665699

Pulled By: nicklockwood

fb-gh-sync-id: 3a767e43170074e2419067d5c8eae61668ebb5e9
This commit is contained in:
Manuel Nakamurakare
2015-11-24 14:52:09 -08:00
committed by facebook-github-bot-4
parent b5be05d82b
commit 9fc3991615
11 changed files with 63 additions and 34 deletions

View File

@@ -83,6 +83,11 @@ var SliderIOS = React.createClass({
*/
trackImage: Image.propTypes.source,
/**
* Sets an image for the thumb. It only supports static images.
*/
thumbImage: Image.propTypes.source,
/**
* Callback continuously called while the user is dragging the slider.
*/
@@ -114,7 +119,7 @@ var SliderIOS = React.createClass({
});
let {style, ...props} = this.props;
style = [styles.slider, this.props.style];
style = [styles.slider, style];
return (
<RCTSlider