Open Yasser-Belatreche opened 2 years ago
I don't have any plans to add RTL support personally, but I'd be open to reviewing a PR if anyone created one.
<MySlider
trackStyle={style.track}
thumbStyle={{...style.thumb, borderColor: renderThumbColor()}}
maximumTrackTintColor={renderColor()}
minimumTrackTintColor={colors.backgroundColors.background}
thumbTintColor={colors.backgroundColors.surface}
maximumValue={maximumValue}
minimumValue={minimumValue}
animateTransitions
onValueChange={value => setValue(value)}
minimumValue={1301}
maximumValue={1402}
values={[1304]}
step={1}
onSlidingComplete={value => console.log(value)}
value={value}
renderAboveThumbComponent={index => (
<View
style={[
style.baloon,
{
backgroundColor: renderAboveThumbComponentColor(),
},
]}>
<Text
text={Math.abs(
maximumValue - value[index] + minimumValue
)}
// text={value[index]}
fullSize={false}
paddingHorzontalRatio={3}
color={renderBaloonTextColor()}
ratio={0}
typogeraphy={bodyFontStyles.medium12}
/>
</View>
)}
{...rest}
/>
I just found this too.
The Slider will always return to minVal and not stay where released but the Text does as the value is dispatched in
handleChange
The deprecated RN Slider works with RTK.
Combing the basic RTK 'message' and Slider examples: