rc-wizard-2

0.0.8 • Public • Published

rc-wizard-2


React Wizard Component

NPM version Dependency Status devDependency Status npm download

Development

npm install
npm start

Example

http://localhost:8000/examples/

online example: http://xuqingkuang.github.io/rc-wizard/

install

rc-wizard

Usage

import React from 'react';
import Wizard from 'rc-wizard';
const Test = () => {
  return (
    <Wizard id="test" onDone={() => { alert('Wizard is done'); }}>
      <Wizard.Step key="1">
        I am the first page.
      </Wizard.Step>
      <Wizard.Step key="2">
        I am the second page.
      </Wizard.Step>
      <Wizard.Step key="3">
        I am the third page.
      </Wizard.Step>
    </Wizard>
  )
}
React.render(<Test />, document.getElementById('container'));

API

Wizard class props

name type default description
id String Absolute identification
className String wizard additional css class of root dom node
displayKey String The key will be displayed by default
onDone Function Callback when the wizard is completed

Wizard.Step class props

name type default description
key String Required, unique "key" prop
onPrevious Function Callback for previous button clicked
onNext Function Callback for next button clicked

Test Case

npm test
npm run chrome-test

Coverage

npm run coverage

open coverage/ dir

License

rc-wizard is released under the MIT license.

Package Sidebar

Install

npm i rc-wizard-2

Weekly Downloads

0

Version

0.0.8

License

MIT

Unpacked Size

4.46 kB

Total Files

3

Last publish

Collaborators

  • tilakranjan99