Skip to content

Configure actions to transition to a different story? #50

@tlrobinson

Description

@tlrobinson

It would be nice if an action could trigger a transition to a different story to simulate interactivity, similar to how you can create simple prototypes with Invision, Framer.js, etc.

For example, say you have a "Toggle" widget with two states, "on" and "off", it would be nice if you could set up the actions for each story to switch to another story to simulate the toggle actually occurring:

storiesOf('Toggle', module)
  .add('on', () => {
    return <Toggle value={true} onChange={action('onChange', 'off')} />
  })
  .add('off', () => {
    return <Toggle value={false} onChange={action('onChange', 'on')} />
  });

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions