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
Pass description in sections #743
Conversation
docs changed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, looks useful!
return ( | ||
<section className={classes.root}> | ||
{name && ( | ||
<SectionHeading depth={depth} id={slug} slotName="sectionToolbar" slotProps={allProps}> | ||
{name} | ||
</SectionHeading> | ||
)} | ||
{description && <Markdown text={`${description}`} inline />} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Why is it inline? Shouldn’t it be rendered on its own line with a proper whitespace below?
- I think just
text={description}
will be enough.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yor are right about both and changed :)
|
||
const contentJsx = content && <Examples examples={content} name={name} />; | ||
const componentsJsx = components && <Components components={components} depth={depth + 1} />; | ||
const sectionsJsx = sections && <Sections sections={sections} depth={depth + 1} />; | ||
|
||
return ( | ||
<SectionRenderer | ||
description={description} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you need to update PropTypes of SectionRenderer.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done , sorry :)
Codecov Report
|
So we got them Node 4 failing again :( |
Try to merge master, I’ve made it optional. |
4a0b234
to
9b550e1
Compare
Passed 😍 |
## New features * New option `editorConfig` to change CodeMirror options (#648, [#662](#662) by @SaraVieira) * Allow descriptions for sections ([#743](#743) by @SaraVieira) * Add TypeScript files to default components and ignore patterns ([#749](#749), part of [#750](#750)) ## Bug fixes * Fix global access to all components in isolation mode ([#738](#738)) * Fix color issue in Safari ([#739](#739)) * Allow overriding of renderer-only components ([#710](#710)) * Do not overflow floated elements in examples (#772, [#773](#773) by @roblevintennis) * HTML escaping in Add example block ([#741](#741)) * Fix infinite loop caused by markdown-to-jsx ([#742](#742))
## New features * New option `editorConfig` to change CodeMirror options (#648, [#662](#662) by @SaraVieira) * Allow descriptions for sections ([#743](#743) by @SaraVieira) * Add TypeScript files to default components and ignore patterns ([#749](#749), part of [#750](#750)) ## Bug fixes * Fix global access to all components in isolation mode ([#738](#738)) * Fix color issue in Safari ([#739](#739)) * Allow overriding of renderer-only components ([#710](#710)) * Do not overflow floated elements in examples (#772, [#773](#773) by @roblevintennis) * HTML escaping in Add example block ([#741](#741)) * Fix infinite loop caused by markdown-to-jsx ([#742](#742))
## New features * New option `editorConfig` to change CodeMirror options (#648, [#662](#662) by @SaraVieira) * Allow descriptions for sections ([#743](#743) by @SaraVieira) * Add TypeScript files to default components and ignore patterns ([#749](#749), part of [#750](#750)) ## Bug fixes * Fix global access to all components in isolation mode ([#738](#738)) * Fix color issue in Safari ([#739](#739)) * Allow overriding of renderer-only components ([#710](#710)) * Do not overflow floated elements in examples (#772, [#773](#773) by @roblevintennis) * HTML escaping in Add example block ([#741](#741)) * Fix infinite loop caused by markdown-to-jsx ([#742](#742))
## New features * New option `editorConfig` to change CodeMirror options (#648, [#662](styleguidist/react-styleguidist#662) by @SaraVieira) * Allow descriptions for sections ([#743](styleguidist/react-styleguidist#743) by @SaraVieira) * Add TypeScript files to default components and ignore patterns ([#749](styleguidist/react-styleguidist#749), part of [#750](styleguidist/react-styleguidist#750)) ## Bug fixes * Fix global access to all components in isolation mode ([#738](styleguidist/react-styleguidist#738)) * Fix color issue in Safari ([#739](styleguidist/react-styleguidist#739)) * Allow overriding of renderer-only components ([#710](styleguidist/react-styleguidist#710)) * Do not overflow floated elements in examples (#772, [#773](styleguidist/react-styleguidist#773) by @roblevintennis) * HTML escaping in Add example block ([#741](styleguidist/react-styleguidist#741)) * Fix infinite loop caused by markdown-to-jsx ([#742](styleguidist/react-styleguidist#742))
## New features * New option `editorConfig` to change CodeMirror options (#648, [#662](styleguidist/react-styleguidist#662) by @SaraVieira) * Allow descriptions for sections ([#743](styleguidist/react-styleguidist#743) by @SaraVieira) * Add TypeScript files to default components and ignore patterns ([#749](styleguidist/react-styleguidist#749), part of [#750](styleguidist/react-styleguidist#750)) ## Bug fixes * Fix global access to all components in isolation mode ([#738](styleguidist/react-styleguidist#738)) * Fix color issue in Safari ([#739](styleguidist/react-styleguidist#739)) * Allow overriding of renderer-only components ([#710](styleguidist/react-styleguidist#710)) * Do not overflow floated elements in examples (#772, [#773](styleguidist/react-styleguidist#773) by @roblevintennis) * HTML escaping in Add example block ([#741](styleguidist/react-styleguidist#741)) * Fix infinite loop caused by markdown-to-jsx ([#742](styleguidist/react-styleguidist#742))
## New features * New option `editorConfig` to change CodeMirror options (#648, [#662](styleguidist/react-styleguidist#662) by @SaraVieira) * Allow descriptions for sections ([#743](styleguidist/react-styleguidist#743) by @SaraVieira) * Add TypeScript files to default components and ignore patterns ([#749](styleguidist/react-styleguidist#749), part of [#750](styleguidist/react-styleguidist#750)) ## Bug fixes * Fix global access to all components in isolation mode ([#738](styleguidist/react-styleguidist#738)) * Fix color issue in Safari ([#739](styleguidist/react-styleguidist#739)) * Allow overriding of renderer-only components ([#710](styleguidist/react-styleguidist#710)) * Do not overflow floated elements in examples (#772, [#773](styleguidist/react-styleguidist#773) by @roblevintennis) * HTML escaping in Add example block ([#741](styleguidist/react-styleguidist#741)) * Fix infinite loop caused by markdown-to-jsx ([#742](styleguidist/react-styleguidist#742))
In the project I am currently in we want to show section descriptions in the header of the section.
Also changed one of the styleguide configs to show this
Is this okay ?