Skip to content

Commit 1e24b1d

Browse files
goodmorninggoawaysapegin
authored andcommitted
Fix: Add line break between description and extra when rendering props (styleguidist#290)
1 parent 2bb09b7 commit 1e24b1d

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

src/rsg-components/Props/Props.spec.js

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ test('should render PropTypes.string', () => {
3232
<td><Code>color</Code></td>
3333
<td><Code>string</Code></td>
3434
<td></td>
35-
<td><Group /></td>
35+
<td><Group separator={<br />} /></td>
3636
</tr>
3737
);
3838
});
@@ -45,7 +45,7 @@ test('should render PropTypes.string with a default value', () => {
4545
<td><Code>color</Code></td>
4646
<td><Code>string</Code></td>
4747
<td><Code>pink</Code></td>
48-
<td><Group /></td>
48+
<td><Group separator={<br />} /></td>
4949
</tr>
5050
);
5151
});
@@ -58,7 +58,7 @@ test('should render PropTypes.string.isRequired', () => {
5858
<td><Code>color</Code></td>
5959
<td><Code>string</Code></td>
6060
<td><span>Required</span></td>
61-
<td><Group /></td>
61+
<td><Group separator={<br />} /></td>
6262
</tr>
6363
);
6464
});
@@ -71,7 +71,7 @@ test('should render PropTypes.arrayOf', () => {
7171
<td><Code>colors</Code></td>
7272
<td><Code>string[]</Code></td>
7373
<td></td>
74-
<td><Group /></td>
74+
<td><Group separator={<br />} /></td>
7575
</tr>
7676
);
7777
});
@@ -84,7 +84,7 @@ test('should render PropTypes.instanceOf', () => {
8484
<td><Code>num</Code></td>
8585
<td><Code>Number</Code></td>
8686
<td></td>
87-
<td><Group /></td>
87+
<td><Group separator={<br />} /></td>
8888
</tr>
8989
);
9090
});
@@ -97,7 +97,7 @@ test('should render PropTypes.shape', () => {
9797
<td><Code>shape</Code></td>
9898
<td></td>
9999
<td>
100-
<Group>
100+
<Group separator={<br />}>
101101
<div>
102102
<Code>bar</Code>: <Code>number</Code><span>Required</span>
103103
</div>
@@ -118,7 +118,7 @@ test('should render description in Markdown', () => {
118118
<td><Code>color</Code></td>
119119
<td><Code>string</Code></td>
120120
<td></td>
121-
<td><Group><Markdown text="Label" /></Group></td>
121+
<td><Group separator={<br />}><Markdown text="Label" /></Group></td>
122122
</tr>
123123
);
124124
});
@@ -131,7 +131,7 @@ test('should render unknown proptype for a prop when a relevant proptype is not
131131
<td><Code>color</Code></td>
132132
<td><Code>unknown</Code></td>
133133
<td><Code>pink</Code></td>
134-
<td><Group /></td>
134+
<td><Group separator={<br />} /></td>
135135
</tr>
136136
);
137137
});

src/rsg-components/Props/PropsRenderer.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ function renderDescription(prop) {
5757
const { description } = prop;
5858
const extra = renderExtra(prop);
5959
return (
60-
<Group>
60+
<Group separator={<br />}>
6161
{description && <Markdown text={description} inline />}
6262
{extra}
6363
</Group>

0 commit comments

Comments
 (0)