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.

Are there plans for @storybook/html and @storybook/addon-info to play nicely?

See original GitHub issue

Currently using @storybook/html and @storybook/addon-info breaks storybook. The combo gets an error Expecting an HTML snippet or DOM node from the story.

I would like to use @storybook/html to build HTML/CSS components and have the copy code to the clipboard feature from @storybook/addon-info. The other options in addon-info would be great too, but copy to the clipboard is my primary use case.

There are 2 closed issues that reference my needs #3985 + #2187. The latter mentions using vue, I attempted this but found it adds undesired complexity.

I appreciate all the work that has gone into storybook. Thank you to all the maintainers for their effort. I am unsure if I am able to work on this feature, I’m just curious if this has any priority.

Here is an example of how I’d like to use @storybook/html + @storybook/addon-info in a story…

import { storiesOf } from '@storybook/html';
import { withInfo } from '@storybook/addon-info';

storiesOf('My little pony', module)
  .addDecorator(withInfo)
  .add('Twilight Sparkle', () => `<div>Twilight Sparkle</div>`)

// OR

storiesOf('Unicorns', module)
  .add('Twilight Sparkle', withInfo('Twilight Sparkle')(() => `<div>Twilight Sparkle</div>`))

…and the desired result screen shot 2018-11-22 at 12 22 14 pm

Thank you.

Issue Analytics

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

github_iconTop GitHub Comments

3reactions
shilmancommented, Mar 22, 2019
2reactions
Pickracommented, Dec 16, 2018

Hey @shilman, I just wanted to mention that @kgroat and I built a solution in case anyone else was looking for something. https://github.com/Pickra/copy-code-block Thanks again!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Are there plans for @storybook/html and @storybook/addon ...
I would like to use @storybook/html to build HTML/CSS components and have the copy code to the clipboard feature from @storybook/addon-info .
Read more >
Frequently Asked Questions - Storybook - JS.ORG
Storybook is a frontend workshop for building UI components and pages in isolation. Thousands of teams use it for UI development, testing, and...
Read more >
@storybook/addon-docs | Yarn - Package Manager
A Storybook release process based on Semver. In short: Merge all PRs into next , which is the default branch. Cherry-pick bugfix PRs...
Read more >
Introduction to Using Storybook for Angular | DigitalOcean
Let's quickly go over setting up Storybook for Angular as well as ... Now, in the root of an Angular project, run the...
Read more >
Storybook and Figma
Click view story in the right sidebar. or run the Storybook plugin. ... Storybook design addon allows you to embed Figma files and...
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