Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How do I write a story with flowtype? #925

Closed
lifeiscontent opened this issue Apr 21, 2017 · 2 comments
Closed

How do I write a story with flowtype? #925

lifeiscontent opened this issue Apr 21, 2017 · 2 comments

Comments

@lifeiscontent
Copy link
Member

Sorry, I'm new to flow, any chance someone can help me out here?

line 5 is storiesOf('NodeContextMenu', module).add('default', () => (

import React from 'react';
import {storiesOf} from '@kadira/storybook';
import NodeContextMenu from './index';

storiesOf('NodeContextMenu', module).add('default', () => (
  <NodeContextMenu>
    <NodeContextMenu.Item icon="trashbin-18">Delete</NodeContextMenu.Item>
    <NodeContextMenu.Item icon="lock-18">Lock</NodeContextMenu.Item>
  </NodeContextMenu>
));
Type Source File Line Description
Warning Type Coverage src/components/NodeContextMenu/index.stories.js 5 Not covered by Flow
Warning Type Coverage src/components/NodeContextMenu/index.stories.js 5 Not covered by Flow
Warning Type Coverage src/components/NodeContextMenu/index.stories.js 5 Not covered by Flow
@TheSisb
Copy link

TheSisb commented May 24, 2017

We skip flow on stories. Only on components.

@ndelangen
Copy link
Member

You load stories in config.js and they are loaded through webpack.

So you have the option to add a webpack loaded with babel + flow.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants