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-info] How to specify new-line in description #1311

Closed
Stupidism opened this issue Jun 17, 2017 · 8 comments
Closed

[addon-info] How to specify new-line in description #1311

Stupidism opened this issue Jun 17, 2017 · 8 comments

Comments

@Stupidism
Copy link
Contributor

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

@shilman
Copy link
Member

shilman commented Jun 21, 2017

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

@Stupidism
Copy link
Contributor Author

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

@Li0liQ
Copy link
Contributor

Li0liQ commented Jun 28, 2017

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.

@bmv437
Copy link
Contributor

bmv437 commented Aug 3, 2017

Any way to make it support markdown?
Similar to
https://github.com/storybooks/storybook/blob/master/addons/info/src/components/Story.js#L222

@dangreenisrael
Copy link
Member

@Stupidism would this PR solve your problem #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.

@Stupidism
Copy link
Contributor Author

@dangreenisrael I think so. Thank you very much!

Hypnosphi referenced this issue Oct 16, 2017
…ine-in-description-#1311

Add ability to parse line breaks into <br/> for Docgen description in…
@stale
Copy link

stale bot commented Nov 30, 2017

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!

@stale stale bot added the inactive label Nov 30, 2017
@stale
Copy link

stale bot commented Dec 15, 2017

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!

@stale stale bot closed this as completed Dec 15, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants