Storybook-readme: 32px margin added to page when only used in sidebar

Created on 27 Jun 2019  路  2Comments  路  Source: tuchk4/storybook-readme

When content isn't enabled (readme only in sidebar) storybook-readme still wraps the story in the following HTML. The main issue with this is that it adds a 32px top and bottom margin to the page.

<div class="storybook-readme-story"><div style="margin: 32px 0px;"><div>
   ...
</div></div></div>
bug

Most helpful comment

Adding this to your storybook config removes the margins:

import { configureReadme } from 'storybook-readme';

configureReadme({
  StoryPreview: ({ children }) => children,
});

All 2 comments

Any workaround for this? Having the same issue.

Adding this to your storybook config removes the margins:

import { configureReadme } from 'storybook-readme';

configureReadme({
  StoryPreview: ({ children }) => children,
});
Was this page helpful?
0 / 5 - 0 ratings

Related issues

robcaldecottvelo picture robcaldecottvelo  路  5Comments

mktrue picture mktrue  路  3Comments

jayknott picture jayknott  路  6Comments

lychyi picture lychyi  路  5Comments

deehuey picture deehuey  路  3Comments