Open NathanDeveloping opened 4 years ago
index.tsx
import * as React from 'react'; export interface AProps { name?: string; } const A: React.FunctionComponent<AProps> = ({name}) => { return <p>{name}</p>; }; A.displayName = 'A'; export {A};
a.story.mdx
import {Meta, Story, Preview, Props} from '@storybook/addon-docs/blocks'; import {A} from '.'; // <------------------ <Meta title="A" component={A} /> <Story name="Default"> <A name="pelo" /> </Story> <Props of={A} />
A.tsx
same as index.tsx above
a.story.tsx
import {A} from './A'; // <------------------ <Meta title="A" component={A} /> <Story name="Default"> <A name="pelo" /> </Story> <Props of={A} />
It seems that component files named with hypen cannot be parsed too
doesn't work :
index.tsx
a.story.mdx
works:
A.tsx
same as index.tsx above
a.story.tsx