How to use the @storybook/core-events.SELECT_STORY function in @storybook/core-events

To help you get started, we’ve selected a few @storybook/core-events examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github storybookjs / storybook / app / react-native / src / preview / index.tsx View on Github external
_selectStory(story: any) {
    const channel = addons.getChannel();

    this._stories.setSelection({ storyId: story.id, viewMode: 'story' }, null);
    channel.emit(Events.SELECT_STORY, story);
  }
github storybookjs / storybook / app / react-native / src / preview / components / StoryListView / index.tsx View on Github external
componentDidMount() {
    const channel = addons.getChannel();
    channel.on(Events.STORY_ADDED, this.handleStoryAdded);
    channel.on(Events.SELECT_STORY, this.forceReRender);
    this.handleStoryAdded();
  }
github storybookjs / storybook / addons / ondevice-backgrounds / src / BackgroundPanel.tsx View on Github external
componentWillUnmount() {
    this.props.channel.removeListener(Events.SELECT_STORY, this.onStorySelected);
  }