agentS / react-native-slider-button

Slider button inspired by the slide to unlock widget.
MIT License
34 stars 7 forks source link

Custom thumb #2

Open IgorVanian opened 7 years ago

IgorVanian commented 7 years ago

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 commented 7 years ago

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

IgorVanian commented 7 years ago

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

agentS commented 7 years ago

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.