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

Add line break between description and extra when rendering props #290

Merged
merged 3 commits into from
Jan 23, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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