question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Replace the next button with renderNextButton func.

See original GitHub issue

Right now, we can customize the button text with nextButton prop. However, if we want to replace our own button, such as material-ui, we can not put the button into that prop since we are nesting a <button /> into another <button />, It will be much better if we can add a hoc to give the ability to the user so that we can customize everything of the button and the close button.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
elrumordelaluzcommented, Jul 17, 2018

@Setsun absolutely!

This is what I working on for the next version.

Glad to know you are using for reactour for your project. Thanks for the ideas!

1reaction
setsuncommented, Jul 16, 2018

This is something I also need for a project I’m working on at my company. We’re maintaining an internal fork, but are looking to make a PR for an upstream change as soon as that is ready.

A potential solution is a function as child render to handle rendering the step in all cases when the internal state changes? Quick Example:

<Tour
   steps={steps}
   ...
>
{(props) => (
  <Container>
     <CustomDots step={props.stepIndex} />
     <CustomCloseButton onClick={props.onRequestClose} />
     {...}
  </Container>
)}
</Tour>
Read more comments on GitHub >

github_iconTop Results From Across the Web

react-native-app-intro-slider/README.md - UNPKG
Pass a data-array to AppIntroSlider along with a `renderItem`-function: ... `function` | renders a Text-component | Use to supply your own next button....
Read more >
reactjs - How to add custom arrow buttons to Alice-Carousel?
Hi for the renderNextButton / renderPrevButton you have to declare a function first, then pass that function ...
Read more >
react-native-app-intro-slider - npm
Configure behavior ; showDoneButton, boolean, true, Disable to hide the done button ; onSlideChange, function, void, Called when user goes changes ...
Read more >
Avoiding Switch Statements in React/TypeScript - Medium
Switch statements replace long if-else chains. ... the BACK button ( renderBackButton ) and the NEXT button ( renderNextButton ) repeatedly.
Read more >
PF4 wizard - Data driven forms
crossroads, array, undefined, Array of field names, which change next steps ... renderNextButton, Function which completely handle the next/submit button.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found