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 file types
Jump to…
Jump to file
Failed to load files.

Always

Just for now

@@ -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
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.