Skip to content

Commit

Permalink
Ori MultiSlider.js
Browse files Browse the repository at this point in the history
  • Loading branch information
GarryLaly authored Oct 11, 2023
1 parent 59d21a4 commit 7fbafe3
Showing 1 changed file with 4 additions and 27 deletions.
31 changes: 4 additions & 27 deletions MultiSlider.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import React from 'react';
import { Text } from 'react-native';
import LinearGradient from 'react-native-linear-gradient'

import {
StyleSheet,
Expand Down Expand Up @@ -549,45 +548,23 @@ export default class MultiSlider extends React.Component {
const body = (
<React.Fragment>
<View style={[styles.fullTrack, { width: sliderLength }]}>
{twoMarkers ? <View
<View
style={[
styles.track,
this.props.trackStyle,
trackOneStyle,
{ width: trackOneLength },
]}
/> : <LinearGradient
style={[
styles.track,
this.props.trackStyle,
trackOneStyle,
{ width: trackOneLength },
]}
colors={this.props.trackGradientColors || ['white', 'chocolate']}
start={{ x: 0, y: 0 }}
end={{ x: 1, y: 0 }}
/>
}
{twoMarkers ? <LinearGradient
style={[
styles.track,
this.props.trackStyle,
trackTwoStyle,
{ width: trackTwoLength },
]}
colors={this.props.trackGradientColors || ['white', 'chocolate']}
start={{ x: 0, y: 0 }}
end={{ x: 1, y: 0 }}
{...(twoMarkers ? this._panResponderBetween.panHandlers : {})}
/> : <View
/>
<View
style={[
styles.track,
this.props.trackStyle,
trackTwoStyle,
{ width: trackTwoLength },
]}
{...(twoMarkers ? this._panResponderBetween.panHandlers : {})}
/>}
/>
{twoMarkers && (
<View
style={[
Expand Down

0 comments on commit 7fbafe3

Please sign in to comment.