Skip to content

Conversation

@konsumer
Copy link
Contributor

@konsumer konsumer commented Apr 21, 2017

Issue:

I'd like to see description from __docgenInfo in the props documentation in info plugin

What I did

Added code to PropTable

How to test

Make a story with a component that has documented (via docgen-style text) props, and the description will show up.

Like this:

/** cool button-type thing */
const Button = ({children, onClick}) => (
  <button onClick={onClick}>{children}</button>
)
Button.propTypes = {
  /** Things and stuffs */
  onClick: PropTypes.func
}

storiesOf('Button', module)
  .addWithInfo('demo - David', 'Button with children set to "David"', () => (
    <Button onClick={action('clicked')}>David</Button>
  ))

You will see a description field in the table that says Things and stuffs.

@ndelangen ndelangen merged commit 25d8a2e into storybookjs:master Apr 28, 2017
@ndelangen
Copy link
Member

Thank you @konsumer !

@nx-cloud
Copy link

nx-cloud bot commented May 8, 2025

View your CI Pipeline Execution ↗ for commit 67e325d.

Command Status Duration Result
nx run-many -t build --parallel=3 ✅ Succeeded 1m 41s View ↗

☁️ Nx Cloud last updated this comment at 2025-05-08 14:56:15 UTC

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants