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
  • Loading branch information
goodmorninggoaway authored and sapegin committed Jan 23, 2017
1 parent 2bb09b7 commit 1e24b1d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
16 changes: 8 additions & 8 deletions src/rsg-components/Props/Props.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ test('should render PropTypes.string', () => {
<td><Code>color</Code></td>
<td><Code>string</Code></td>
<td></td>
<td><Group /></td>
<td><Group separator={<br />} /></td>
</tr>
);
});
Expand All @@ -45,7 +45,7 @@ test('should render PropTypes.string with a default value', () => {
<td><Code>color</Code></td>
<td><Code>string</Code></td>
<td><Code>pink</Code></td>
<td><Group /></td>
<td><Group separator={<br />} /></td>
</tr>
);
});
Expand All @@ -58,7 +58,7 @@ test('should render PropTypes.string.isRequired', () => {
<td><Code>color</Code></td>
<td><Code>string</Code></td>
<td><span>Required</span></td>
<td><Group /></td>
<td><Group separator={<br />} /></td>
</tr>
);
});
Expand All @@ -71,7 +71,7 @@ test('should render PropTypes.arrayOf', () => {
<td><Code>colors</Code></td>
<td><Code>string[]</Code></td>
<td></td>
<td><Group /></td>
<td><Group separator={<br />} /></td>
</tr>
);
});
Expand All @@ -84,7 +84,7 @@ test('should render PropTypes.instanceOf', () => {
<td><Code>num</Code></td>
<td><Code>Number</Code></td>
<td></td>
<td><Group /></td>
<td><Group separator={<br />} /></td>
</tr>
);
});
Expand All @@ -97,7 +97,7 @@ test('should render PropTypes.shape', () => {
<td><Code>shape</Code></td>
<td></td>
<td>
<Group>
<Group separator={<br />}>
<div>
<Code>bar</Code>: <Code>number</Code><span>Required</span>
</div>
Expand All @@ -118,7 +118,7 @@ test('should render description in Markdown', () => {
<td><Code>color</Code></td>
<td><Code>string</Code></td>
<td></td>
<td><Group><Markdown text="Label" /></Group></td>
<td><Group separator={<br />}><Markdown text="Label" /></Group></td>
</tr>
);
});
Expand All @@ -131,7 +131,7 @@ test('should render unknown proptype for a prop when a relevant proptype is not
<td><Code>color</Code></td>
<td><Code>unknown</Code></td>
<td><Code>pink</Code></td>
<td><Group /></td>
<td><Group separator={<br />} /></td>
</tr>
);
});
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 @@ -57,7 +57,7 @@ function renderDescription(prop) {
const { description } = prop;
const extra = renderExtra(prop);
return (
<Group>
<Group separator={<br />}>
{description && <Markdown text={description} inline />}
{extra}
</Group>
Expand Down

0 comments on commit 1e24b1d

Please sign in to comment.