Storybook: [addon-info] How to specify new-line in description

Created on 18 Jun 2017  路  8Comments  路  Source: storybookjs/storybook

Here is code and snapshot.

RenderCounter.propTypes = {
  /**
   * Initial count for RenderCounter.
   */
  initialCount: T.number,
  /**
   * (props[, next]) => (...args) => {...}
   * get full props of inner onRerender can get \n
   * if next is specified, inner onRerender will not be called until next is called
   */
  onRerender: T.func,
};

image

info feature request help wanted inactive

Most helpful comment

All 8 comments

@Stupidism is this a question or just a useful example for anybody who's trying to do this? Thanks!

Question. As you can see the description of onRerender should be displayed in three lines.

There is no way to do that at the moment.
See https://github.com/storybooks/storybook/blob/master/addons/info/src/components/Story.js#L251 - description is added as a text node in markup.

@Stupidism would this PR solve your problem https://github.com/storybooks/storybook/pull/2053

@bmv437 I think having it support markdown would be problematic because the content is being rendered into a <td> which would be less than ideal with things like h*. However, I do think that supporting markdown in notes would make a lot of sense.

@dangreenisrael I think so. Thank you very much!

Hi everyone! Seems like there hasn't been much going on in this issue lately. If there are still questions, comments, or bugs, please feel free to continue the discussion. Unfortunately, we don't have time to get to every issue. We are always open to contributions so please send us a pull request if you would like to help. Inactive issues will be closed after 60 days. Thanks!

Hey there, it's me again! I am going close this issue to help our maintainers focus on the current development roadmap instead. If the issue mentioned is still a concern, please open a new ticket and mention this old one. Cheers and thanks for using Storybook!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

shilman picture shilman  路  3Comments

shilman picture shilman  路  3Comments

ZigGreen picture ZigGreen  路  3Comments

tlrobinson picture tlrobinson  路  3Comments

miljan-aleksic picture miljan-aleksic  路  3Comments