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

[SliderIOS] Add minimumTrackTintColor and maximumTrackTintColor to SliderIOS #799

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
@@ -54,6 +54,18 @@ var SliderIOS = React.createClass({
*/
maximumValue: PropTypes.number,

/**
* The color used for the track to the left of the button. Overrides the
* default blue gradient image.
*/
minimumTrackTintColor: PropTypes.string,

/**
* The color used for the track to the right of the button. Overrides the
* default blue gradient image.
*/
maximumTrackTintColor: PropTypes.string,

/**
* Callback continuously called while the user is dragging the slider.
*/
@@ -84,6 +96,8 @@ var SliderIOS = React.createClass({
value={this.props.value}
maximumValue={this.props.maximumValue}
minimumValue={this.props.minimumValue}
minimumTrackTintColor={this.props.minimumTrackTintColor}
maximumTrackTintColor={this.props.maximumTrackTintColor}
onChange={this._onValueChange}
/>
);
@@ -101,6 +115,8 @@ var validAttributes = {
value: true,
minimumValue: true,
maximumValue: true,
minimumTrackTintColor: true,
maximumTrackTintColor: true,
};

var RCTSlider = createReactIOSNativeComponentClass({
@@ -50,5 +50,7 @@ - (void)sliderTouchEnd:(UISlider *)sender
RCT_EXPORT_VIEW_PROPERTY(value, float);
RCT_EXPORT_VIEW_PROPERTY(minimumValue, float);
RCT_EXPORT_VIEW_PROPERTY(maximumValue, float);
RCT_EXPORT_VIEW_PROPERTY(minimumTrackTintColor, UIColor);
RCT_EXPORT_VIEW_PROPERTY(maximumTrackTintColor, UIColor);

@end