1.3.2 • Published 3 years ago

@jsh1400/help.js v1.3.2

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

Tour / Help

help.js

NPM version NPM downloads NPM downloads MIT License Build Status

This Component is Tour (step by step) for help to learning ... :)

Installation

npm i @jsh1400/help.js

Usage

import React from 'react'
import JHelp from '@jsh1400/help.js'

export default class App extends React.Component {
	state = {play: false}
	render() {
		const helpList= [
		  {
		    selector: '#iTest_7',
		    title: 'help test 7',
		    description: 'help test 7'
		  },
		  {
		    selector: '#iTest_37',
		    description: 'help test 37',
		    position: 'bottom'
		  },
		  {
		    selector: '#iTest_57',
		    description: 'help test 57'
		  }
		]
		return(<div>
			<button onClick={()=> this.setState({play: !this.state.play})}>HELP</button>
			  <JHelp
				    play={this.state.play}
				    helpList={helpList}
				    onSkip={()=>this.setState({play: false})}
				    onClose={()=>this.setState({play: false})}
			    />
			</div>)
	}
}

Props

propstypedefault
* playbooleanfalse
* helpListarray{ selector: string, img: string, title: string, description: string, position: string }[]
startStepnumber0
endStepnumber0
nextLabelstring'next'
prevLabelstring'prev'
skipLabelstring'skip'
closeLabelstring'close'
directionstring'ltr'
onPrevfunction() => { step: string }
onNextfunction() => { step: string }
onSkipfunction() => { step: string }
onClosefunction() => { step: string }
prevClassNamestringundefined
nextClassNamestringundefined
skipClassNamestringundefined
closeClassNamestringundefined
breakStepbooleanfalse
paddingnumber0
styleobject{}

Demo

help.js online Demo

License

MIT

Author

Javad Shariati jsh1400@yahoo.com

1.3.2

3 years ago

1.3.1

3 years ago

1.3.0

3 years ago

1.2.0

4 years ago

1.1.1

4 years ago

1.1.0

4 years ago

1.0.8

4 years ago

1.0.7

4 years ago

1.0.6

4 years ago

1.0.5

4 years ago

1.0.4

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.3

4 years ago

1.0.0

4 years ago

0.0.0

4 years ago