storybook-addon-xstate

0.0.2 • Public • Published

xstate-addon

A storybook addon project for xstate (https://github.com/davidkpiano/xstate)

The project is in an early stage. Everyone who is interested in bringing this project forward is welcome to contribute ideas, docs and code.

install

!! storybook version: 3.3.0 !!

npm i storybook-addon-xstate -D

register

addons.js

import 'storybook-addon-xstate/register';

story

import { WithXStateGraph } from 'storybook-addon-xstate';

<WithXStateGraph
   machine={xstateMachine}
   onTransition={onEvent}
   currentState={currentState}
>
  <TrafficLight light={currentState} />
 </WithXStateGraph>

basic idea

Basic Idea

Readme

Keywords

Package Sidebar

Install

npm i storybook-addon-xstate

Weekly Downloads

1

Version

0.0.2

License

MIT

Unpacked Size

363 kB

Total Files

26

Last publish

Collaborators

  • do-wa