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>
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,
});
Most helpful comment
Adding this to your storybook config removes the margins: