tuchk4 / storybook-readme

React Storybook addon to render README files in github style
MIT License
544 stars 249 forks source link

Readme override addon-note #199

Open kbhutiya opened 5 years ago

kbhutiya commented 5 years ago

Hi there, I have a story where I am using add-on-notes for Notes panel and also readme, somehow every time I use readme it overrides notes ! It depends on which one is written first will render ! For eg.

.add(`Demo1`, () => `
<asdi-accordion>
  <asdi-bar>
  <asdi-note>
</asdi-accordion>
`,{ notes:`Single Accordion`},
    { readme: { sidebar:`
<asdi-accordion>
  <asdi-bar>
  <asdi-note>
</asdi-accordion>
`}})

Do you have any suggestions for the same?

tuchk4 commented 5 years ago

Seems function add in your example is with wrong arguments.

Try this.

A.add(
  `Demo1`,
  () => `
<asdi-accordion>
  <asdi-bar>
  <asdi-note>
</asdi-accordion>
`,
  {
    notes: `Single Accordion`,
    readme: {
      sidebar: `
<asdi-accordion>
  <asdi-bar>
  <asdi-note>
</asdi-accordion>
`,
    },
  },
);

The original issue cant reporoduce