question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Addon-docs: DocsPage "slots"

See original GitHub issue

Problem

Current version of DocsPage tries to do a bunch of stuff automatically for you based on existing addon-notes/addon-info/docgen annotations. This can result in weird behavior depending on how you set up your storybook.

Solution

  1. Define a set of “slots” on the page and parameters to fill them.
  2. Users can fill those slots manually
  3. Some of those slots may be filled automatically or we may offer ways to configure them to be filled by existing info.

The idea is that we give you a minimal experience out of the box that looks good, and then we help you get to a great page with as little extra work as possible.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:6
  • Comments:8 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
shilmancommented, Aug 9, 2019

MDX is an alternative to DocsPage. DocsPage takes all your stories and turns them into documentation. MDX takes your documentation and turns it into stories (roughly). If you’re writing MDX containing <Story name="...">...</Story> stories and it’s not showing up in your storybook, perhaps you’re not loading the MDX files in your .storybook/config.js? Feel free to jump on our Discord and I can try to help sort things out.

1reaction
shilmancommented, Aug 7, 2019

Hurrah!! I just released https://github.com/storybookjs/storybook/releases/tag/v5.2.0-beta.24 containing PR #7680 that references this issue. Upgrade today to try it out!

You can find this prerelease on the @next NPM tag.

Closing this issue. Please re-open if you think there’s still more to do.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Compare DocsPage and MDX syntax in Storybook with example
Compare DocsPage and MDX syntax side by side and learn to document components using Storybook.
Read more >
Storybook for React — Docs Page - John Au-Yeung
We install the @storybook/addon-docs package so that we can add a custom documentation page. Title and Subtitle have the title and subtitle.
Read more >
Rich docs with Storybook MDX
Our first step was DocsPage, a tool to auto-generate best-practices ... divided into sections such as inputs, outputs, slots, events, etc.
Read more >
storybook code preview doesn't show the usage of slots in ...
import { Source } from '@storybook/addon-docs/blocks' import dedent from 'ts-dedent' <Source language="jsx" code={dedent` <Button ...
Read more >
Storybook Docs Page Displays Extra Jsdoc Tags In Description
storybookjs/storybook. addondocs: Descriptions per Story Funded on Issuehunt addon: docs Addon Docs build prop table from dynamic propTypes? Primary slot ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found