Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Addon-docs: Automatic source selection based on story type #11601

Merged
merged 5 commits into from
Jul 18, 2020

Conversation

shilman
Copy link
Member

@shilman shilman commented Jul 18, 2020

Issue: #11526

What I did

  • Add a new story parameter docs.source.type
  • Use the type to determine which snippet to render

What this change means for users:

  • No-args stories will go back to using the raw source code unless otherwise specified
  • Args stories will use the dynamically-rendered source unless otherwise specified

How to test

See updated stories in official-storybook

Copy link
Member

@tmeasday tmeasday left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some of this might be existing code?

addons/docs/src/blocks/Source.tsx Show resolved Hide resolved
addons/docs/src/blocks/Source.tsx Outdated Show resolved Hide resolved
addons/docs/src/blocks/Source.tsx Outdated Show resolved Hide resolved
@shilman shilman changed the title Addon-docs: Support automatic source selection based on story type Addon-docs: Automatic source selection based on story type Jul 18, 2020
@shilman shilman modified the milestones: 6.1 docs, 6.0 docs Jul 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants