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

Doc block gets overridden if .story is defined #10

Open
ianldgs opened this issue Jun 3, 2021 · 0 comments · May be fixed by #15
Open

Doc block gets overridden if .story is defined #10

ianldgs opened this issue Jun 3, 2021 · 0 comments · May be fixed by #15

Comments

@ianldgs
Copy link

ianldgs commented Jun 3, 2021

If we have something like:

// Some documentation
export const myStory = ({prop}) => {
  <>{prop}</>;
}

myStory.story = {
  args: {
    prop: 'value'
  }
}

"Some documentation" does't show on the docs page.

Current workaround:

// Some documentation
export const myStory = ({prop}) => {
  <>{prop}</>;
}

myStory.story = {
+  ...myStory.story, // to merge what this loader has defined
  args: {
    prop: 'value'
  }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant