1.1.7 • Published 3 years ago

react-tutorial-stepper v1.1.7

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

react-tutorial-stepper

A Tutorial Stepper component for React Applications

NPM JavaScript Style Guide

When you make updates for your React application, you can show your customers what' s news step by step.

Install

npm install --save react-tutorial-stepper

Usage

import React, { Component } from 'react'

import Tutorial from 'react-tutorial-stepper'

class ReactTutorialStepper extends Component {
  render() {
    return (
      <Tutorial
        openTutorial={true}
        elements={['id']} // elements={[<ids of elements>]}
        descriptions={['This is a description.']} // descriptions={[<descriptions of steps>]}
        prevButtonTitle="Prev"
        nextButtonTitle="Next"
        lastStepButtonTitle="Finish"
        onClick={() => { console.log("End of the tutorial"); }}
      />
    )
  }
}

Props

PropTypeRequiredDefaultNote
openTutorialbooleanYesfalseOpen(true)/close(false) the tutorial.
elementsArray-String-YesElement id list.
descriptionsArray-String-YesDescription list for each step. Descriptions depend on id order. They will be dispayed at each step.
prevButtonTitleStringYesTitle for previous button.
nextButtonTitleStringYesTitle for next button.
lastStepButtonTitleStringYesButton title for last step.
onCloseFunctionYesFunction will be executed after closing tutorial.

License

MIT © BatuhanAydonerDev