react-native-slider-button icon indicating copy to clipboard operation
react-native-slider-button copied to clipboard

Custom thumb

Open IgorVanian opened this issue 8 years ago • 3 comments

Nice button !

Is it possible to customize the thumb? I'd like to put an image or an icon instead of the circle.

Thanks

IgorVanian avatar Feb 03 '17 16:02 IgorVanian

Thanks for your compliment!

I directly pass on the options to the slider. So if your slider supports a custom thumb it shouldn't be an issue. So if your React Native version supports it, it shouldn't be an issue.

However, if there are any issues I am afraid I can not help you, as our company Mac Pro has broken down and we do not have a further Apple device.

Yours sincerely,

Lukas Schörghuber

On 03/02/17 17:58, Igor wrote:

Nice button !

Is it possible to customize the thumb? I'd like to put an image or an icon instead of the circle.

Thanks

agentS avatar Feb 07 '17 13:02 agentS

@agentS So which particular prop sets the thumb style? The stylesheet prop is only setting the whole slider style.

IgorVanian avatar Feb 07 '17 13:02 IgorVanian

The keys are simply passed through. My code looks the following:

<SliderIOS key={this.state.timestamp}
style={[styles.slider, styles.sliderBorder,

SliderButtonStyleConstant.slider]} onSlidingComplete={(newValue) => this.onSliderValueChanged(newValue)} minimumValue={0} maximumValue={100} value={actualValue} {...this.props}/>

{...this.props} passes all overgiven parameters through. See the ... operator.

Have a nice day!

On 07/02/17 14:38, Igor wrote:

@agentS So which particular prop sets the thumb style? The stylesheet prop is only setting the whole slider style.

agentS avatar Feb 09 '17 10:02 agentS