1.1.18 • Published 5 years ago
the-step v1.1.18
the-step
Steps for the-components
Installation
$ npm install the-step --save
Usage
'use strict'
import React from 'react'
import { TheStep, TheStepBar, TheStepStyle } from 'the-step'
import { TheSpinStyle } from 'the-spin'
import { TheButtonStyle } from 'the-button'
class ExampleComponent extends React.Component {
constructor (props) {
super(props)
this.state = {
step: 0
}
}
render () {
return (
<div>
<TheStepStyle/>
<TheSpinStyle/>
<TheButtonStyle/>
<TheStepBar step={this.state.step}
onStep={(step) => this.setState({step})}
nodes={[
'The first step',
'The second step',
'The third step'
]}
/>
<TheStep step={this.state.step}
onStep={(step) => this.setState({step})}
isSubmit={this.state.step === 2}
submitText={'Say Yo'}
onSubmit={() => alert('yo')}
>
<TheStep.Content>
<h1>This is content01</h1>
<div style={{height: 300}}>This is content</div>
</TheStep.Content>
<TheStep.Content>
<h1>This is content02</h1>
</TheStep.Content>
<TheStep.Content>
<h1>This is content03</h1>
<div style={{height: 240}}>This is content</div>
</TheStep.Content>
</TheStep>
</div>
)
}
}
export default ExampleComponent
Components
TheStep
Steps for the-component
Props
Name | Type | Description | Default |
---|---|---|---|
backText | string | 'Back' | |
nextText | string | 'Next' | |
onStep | func | null | |
spinning | bool | false | |
step | number | 0 | |
submitText | string |
|
TheStepBar
Props
Name | Type | Description | Default |
---|---|---|---|
nodes | array | [] | |
onStep | func | null | |
step | number | 0 |
TheStepStyle
Style for TheStep
Props
Name | Type | Description | Default |
---|---|---|---|
options | object | Style options | {} |
License
This software is released under the MIT License.
Links
1.1.18
5 years ago
1.1.17
5 years ago
1.1.16
5 years ago
1.1.15
5 years ago
1.1.14
6 years ago
1.1.13
6 years ago
1.1.12
6 years ago
1.1.11
6 years ago
1.1.10
6 years ago
1.1.9
6 years ago
1.1.8
6 years ago
1.1.7
6 years ago
1.1.6
6 years ago
1.1.5
6 years ago
1.1.4
6 years ago
1.1.3
6 years ago
1.1.2
6 years ago
1.1.0
6 years ago
1.0.10
6 years ago
1.0.9
6 years ago
1.0.8
6 years ago
1.0.7
6 years ago
1.0.6
6 years ago
1.0.5
6 years ago
1.0.4
6 years ago
1.0.3
6 years ago
1.0.2
6 years ago
1.0.1
6 years ago
1.0.0
6 years ago