react-native-onboarding-component icon indicating copy to clipboard operation
react-native-onboarding-component copied to clipboard

Feature request

Open kresogalic8 opened this issue 7 years ago • 1 comments

hey man, first of all, nice package :) What would be good to add here is to maybe add finish instead of "continue" so the user can click finish and go to application.

Is that possible on your end?

kresogalic8 avatar Nov 09 '17 21:11 kresogalic8

@kresogalic8

In your pages data, you could add an optional property such as actionTitle.

{
    title: 'Stay warm',
    description: "Don't like the cold wheather? We guarantee you a sunny and warm vacation.",
    backgroundColor: '#FFA11C',
    actionTitle: 'Finish'
}

Then in your actions you would do the following:

<Actions
    actions={[{
        style: { color: page.backgroundColor },
        title: page.actionTitle || 'Continue',
        onPress: () => {
            const x = (index + 1 === pages.length) ? 0 : deviceWidth * (index + 1);
            this.scrollTo(x);
         },
    }]}/>

samcus avatar Nov 21 '17 21:11 samcus