Skip to content

Commit

Permalink
Fix: Add line break between description and extra when rendering props
Browse files Browse the repository at this point in the history
Original PR #290
  • Loading branch information
sapegin committed Jan 25, 2017
1 parent a20d736 commit 6305d35
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 24 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
"react-dev-utils": "^0.4.2",
"react-docgen": "^2.13.0",
"react-docgen-displayname-handler": "^1.0.0",
"react-group": "^1.0.1",
"react-group": "^1.0.2",
"remark": "^6.2.0",
"remark-parse": "^2.2.0",
"semver-utils": "^1.1.1",
Expand Down
2 changes: 1 addition & 1 deletion src/rsg-components/Props/PropsRenderer.js
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ export function PropsRenderer({ classes, props }) {
const { description } = prop;
const extra = renderExtra(prop);
return (
<Group>
<Group separator={<br />}>
{description && <Markdown text={description} inline />}
{extra}
</Group>
Expand Down
16 changes: 8 additions & 8 deletions src/rsg-components/Props/__snapshots__/Props.spec.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ exports[`test should render PropTypes.arrayOf 1`] = `
<td
className="undefined undefined">
<Group
separator=" " />
separator={<br />} />
</td>
</tr>
</tbody>
Expand Down Expand Up @@ -75,7 +75,7 @@ exports[`test should render PropTypes.instanceOf 1`] = `
<td
className="undefined undefined">
<Group
separator=" " />
separator={<br />} />
</td>
</tr>
</tbody>
Expand Down Expand Up @@ -117,7 +117,7 @@ exports[`test should render PropTypes.shape 1`] = `
<td
className="undefined undefined">
<Group
separator=" ">
separator={<br />}>
<div>
<_class>
bar
Expand Down Expand Up @@ -182,7 +182,7 @@ exports[`test should render PropTypes.string 1`] = `
<td
className="undefined undefined">
<Group
separator=" " />
separator={<br />} />
</td>
</tr>
</tbody>
Expand Down Expand Up @@ -228,7 +228,7 @@ exports[`test should render PropTypes.string with a default value 1`] = `
<td
className="undefined undefined">
<Group
separator=" " />
separator={<br />} />
</td>
</tr>
</tbody>
Expand Down Expand Up @@ -274,7 +274,7 @@ exports[`test should render PropTypes.string.isRequired 1`] = `
<td
className="undefined undefined">
<Group
separator=" " />
separator={<br />} />
</td>
</tr>
</tbody>
Expand Down Expand Up @@ -316,7 +316,7 @@ exports[`test should render description in Markdown 1`] = `
<td
className="undefined undefined">
<Group
separator=" ">
separator={<br />}>
<_class
inline={true}
text="Label" />
Expand Down Expand Up @@ -366,7 +366,7 @@ exports[`test should render unknown proptype for a prop when a relevant proptype
<td
className="undefined undefined">
<Group
separator=" " />
separator={<br />} />
</td>
</tr>
</tbody>
Expand Down
21 changes: 7 additions & 14 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,7 @@ async@1.x, async@^1.3.0, async@^1.4.0, async@^1.4.2, async@^1.5.0:
version "1.5.2"
resolved "https://registry.yarnpkg.com/async/-/async-1.5.2.tgz#ec6a61ae56480c0c3cb241c95618e20892f9672a"

async@2.1.2:
async@2.1.2, async@^2.1.2:
version "2.1.2"
resolved "https://registry.yarnpkg.com/async/-/async-2.1.2.tgz#612a4ab45ef42a70cde806bad86ee6db047e8385"
dependencies:
Expand All @@ -349,7 +349,7 @@ async@^0.9.0:
version "0.9.2"
resolved "https://registry.yarnpkg.com/async/-/async-0.9.2.tgz#aea74d5e61c1f899613bf64bda66d4c78f2fd17d"

async@^2.0.1, async@^2.1.2, async@^2.1.4:
async@^2.0.1, async@^2.1.4:
version "2.1.4"
resolved "https://registry.yarnpkg.com/async/-/async-2.1.4.tgz#2d2160c7788032e4dd6cbe2502f1f9a2c8f6cde4"
dependencies:
Expand Down Expand Up @@ -6300,9 +6300,9 @@ react-dom@^15.4.2:
loose-envify "^1.1.0"
object-assign "^4.1.0"

react-group@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/react-group/-/react-group-1.0.1.tgz#b2a8d9eaa1a75f7c630df241bb80ad80a65de7fa"
react-group@^1.0.2:
version "1.0.2"
resolved "https://registry.yarnpkg.com/react-group/-/react-group-1.0.2.tgz#a90cb2e6181cb5301c6e6b9242172393f3cae5cb"

react-modal@^1.6.5:
version "1.6.5"
Expand Down Expand Up @@ -7017,7 +7017,7 @@ sort-keys@^1.0.0:
dependencies:
is-plain-obj "^1.0.0"

source-list-map@^0.1.4, source-list-map@~0.1.0, source-list-map@~0.1.7:
source-list-map@^0.1.4, source-list-map@~0.1.7:
version "0.1.7"
resolved "https://registry.yarnpkg.com/source-list-map/-/source-list-map-0.1.7.tgz#d4b5ce2a46535c72c7e8527c71a77d250618172e"

Expand Down Expand Up @@ -7866,14 +7866,7 @@ webpack-merge@^2.4.0:
dependencies:
lodash "^4.17.4"

webpack-sources@^0.1.0:
version "0.1.3"
resolved "https://registry.yarnpkg.com/webpack-sources/-/webpack-sources-0.1.3.tgz#15ce2fb79d0a1da727444ba7c757bf164294f310"
dependencies:
source-list-map "~0.1.0"
source-map "~0.5.3"

webpack-sources@^0.1.4:
webpack-sources@^0.1.0, webpack-sources@^0.1.4:
version "0.1.4"
resolved "https://registry.yarnpkg.com/webpack-sources/-/webpack-sources-0.1.4.tgz#ccc2c817e08e5fa393239412690bb481821393cd"
dependencies:
Expand Down

0 comments on commit 6305d35

Please sign in to comment.