How to use the react-joyride/es/constants.EVENTS.STEP_AFTER function in react-joyride

To help you get started, we’ve selected a few react-joyride examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github Criptext / Criptext-Email-React-Client / email_mailbox / src / components / UserGuide.js View on Github external
handleCallback = data => {
    const { index, type } = data;
    if (type === EVENTS.TOUR_END && this.state.run) {
      this.setState({ run: false });
    } else if (type === EVENTS.TARGET_NOT_FOUND) {
      this.setState({ run: false });
    } else if (type === EVENTS.STEP_AFTER) {
      const currentStep = this.state.steps[index].name;
      setUserGuideStepStatus(currentStep);
      this.setState({ stepIndex: index + 1 });
    }
  };
github FrontSpot-Community / code-battle / src / client / containers / ProfileContainer / ProfileContainer.js View on Github external
tourCallback = (tour) => {
    const {action, index, type} = tour;

    if (type === EVENTS.STEP_AFTER && index === 1) {
      this.setState({run: false});
    } else if ([EVENTS.STEP_AFTER, EVENTS.CLOSE, EVENTS.TARGET_NOT_FOUND].includes(type)) {
      this.setState({stepIndex: index + (action === ACTIONS.PREV ? -1 : 1)});
    }
  };