Skip to content

Commit 44db0e4

Browse files
committed
1 parent 75e9242 commit 44db0e4

File tree

2 files changed

+14
-10
lines changed

2 files changed

+14
-10
lines changed

MultiSlider.js

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -558,15 +558,17 @@ export default class MultiSlider extends React.Component {
558558
(Dimensions.get('window').width - this.props.sliderLength) / 2;
559559
return (
560560
<View>
561-
<Label
562-
leftDiff={leftDiff}
563-
oneMarkerValue={this.state.valueOne}
564-
twoMarkerValue={this.state.valueTwo}
565-
oneMarkerLeftPosition={positionOne}
566-
twoMarkerLeftPosition={positionTwo}
567-
oneMarkerPressed={this.state.onePressed}
568-
twoMarkerPressed={this.state.twoPressed}
569-
/>
561+
{this.props.enableLabel && (
562+
<Label
563+
leftDiff={leftDiff}
564+
oneMarkerValue={this.state.valueOne}
565+
twoMarkerValue={this.state.valueTwo}
566+
oneMarkerLeftPosition={positionOne}
567+
twoMarkerLeftPosition={positionTwo}
568+
oneMarkerPressed={this.state.onePressed}
569+
twoMarkerPressed={this.state.twoPressed}
570+
/>
571+
)}
570572
{this.props.imageBackgroundSource && (
571573
<ImageBackground
572574
source={this.props.imageBackgroundSource}

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,10 +77,12 @@ Feel free to contribute to this part of the documentation.
7777
| onValuesChangeFinish | (values) => {} | function | Callback when the value stops changing |
7878
| sliderLength | 280 | number | Length of the slider (?) |
7979
| touchDimensions | {height: 50,width: 50,borderRadius: 15,slipDisplacement: 200} | object | (?) |
80+
| enableLabel | | function | Enable the label rendering |
81+
| customLabel | | function | Component used for rendering a label above the cursors. |
8082
| customMarker | | function | Component used for the cursor. |
8183
| customMarkerLeft | | function | Component used for the left cursor. |
8284
| customMarkerRight | | function | Component used for the right cursor. |
83-
| isMarkersSeparated | | boolean | (?) |
85+
| isMarkersSeparated | | boolean | See explaination above in the README.md |
8486
| min | 0 | number | Minimum value available in the slider. |
8587
| max | 10 | number | Maximum value available in the slider. |
8688
| step | 1 | number | Step value of the slider. |

0 commit comments

Comments
 (0)