tuchk4 / storybook-readme

React Storybook addon to render README files in github style

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Readme override addon-note

kbhutiya opened this issue · comments

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?

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