agentS / react-native-slider-button

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

How to change the direction of the slider? (Right to left) #1

Closed Daariush closed 8 years ago

Daariush commented 8 years ago

I've successfully installed it on the project and also change the styling but i'm looking forward how to change the direction of the slider to "right to left" instead of left to right.

Help needed, thanks in advance.

agentS commented 8 years ago

I think that is a feature I have not implemented yet. I am going to investigate this tomorrow morning and create a new revision allowing the slider to be moved from right to left.

Am 14.06.2016 um 09:41 schrieb Dariush:

I've successfully installed it on the project and also change the styling but i'm looking forward how to change the direction of the slider to "right to left" instead of left to right.

Help needed, thanks in advance.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/agentS/react-native-slider-button/issues/1, or mute the thread https://github.com/notifications/unsubscribe/AEzLIEeNRytpsNHkG9kJkxBI9s1Kj_PBks5qLltAgaJpZM4I1Cv1.

agentS commented 8 years ago

I have just added the new rightToLeft property which has to be set to true. Please see the following example:

<SliderButton key={this.state.timestamp}
    text={"Activate >>>"}
    textAnimated={true}
    stylesheet={SliderButtonStyle}
    rightToLeft={true}
    minimumTrackTintColor={"rgba(0,0,0,0)"}
    maximumTrackTintColor={"rgba(0,0,0,0)"}
    onTrigger={this.onSliderButtonActivated}/>

I am closing this issue.

Daariush commented 8 years ago

Thanks alot @agentS for the quick fix 👍