1.1.18 • Published 5 years ago

the-step v1.1.18

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

the-step

Build Status npm Version JS Standard

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

NameTypeDescriptionDefault
backTextstring'Back'
nextTextstring'Next'
onStepfuncnull
spinningboolfalse
stepnumber0
submitTextstring

TheStepBar

Props

NameTypeDescriptionDefault
nodesarray[]
onStepfuncnull
stepnumber0

TheStepStyle

Style for TheStep

Props

NameTypeDescriptionDefault
optionsobjectStyle 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