Skip to content

Commit 8f87a76

Browse files
Remove fragment to support older versions of react (#45)
1 parent 8fc94e7 commit 8f87a76

File tree

5 files changed

+16
-14
lines changed

5 files changed

+16
-14
lines changed

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "react-component-viewer",
3-
"version": "0.21.0",
3+
"version": "0.23.0",
44
"description": "React Component to help with development of other React components",
55
"repository": {
66
"type": "git",

src/components/viewer/ComponentViewer.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,11 +73,11 @@ class ComponentViewer extends Component<Props, ComponentViewerState> {
7373
this.renderSelectionPanelAndDemo(demoEntry);
7474

7575
return (
76-
<React.Fragment>
76+
<div>
7777
<GlobalHotKeysHandler keyBoundActions={this.hotKeyBoundActions}/>
7878
{rendered}
7979
<VisualizedActions/>
80-
</React.Fragment>
80+
</div>
8181
);
8282
}
8383

src/components/viewer/help/ComponentViewerHelp.css

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,4 @@
2929
}
3030

3131
.rcv-component-viewer-help-hotkeys-grid {
32-
display: grid;
33-
34-
grid-template-columns: auto 1fr;
35-
grid-gap: 8px 32px;
3632
}

src/components/viewer/help/ComponentViewerHelp.tsx

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,15 @@ export function ComponentViewerHelp() {
99
return (
1010
<div className="rcv-component-viewer-help">
1111
<h1>Hotkeys</h1>
12-
<div className="rcv-component-viewer-help-hotkeys-grid">
12+
<table className="rcv-component-viewer-help-hotkeys-grid">
13+
<tbody>
1314
{Object.keys(globalActionDefaultKeys).map(actionKey =>
1415
<HotKeyAndDescription
1516
key={actionKey}
1617
actionKey={actionKey}
1718
/>)}
18-
</div>
19+
</tbody>
20+
</table>
1921
<h1>GitHub</h1>
2022
<a href="https://github.com/TestingIsDocumenting/react-component-viewer" target="_blank">Repository</a>
2123
</div>
@@ -28,9 +30,13 @@ interface HotKeyAndDescriptionProps {
2830

2931
function HotKeyAndDescription({actionKey}: HotKeyAndDescriptionProps) {
3032
return (
31-
<React.Fragment>
32-
<HotKeyPill hotKey={globalActionDefaultKeys[actionKey]}/>
33-
<div>{globalActionDescription[actionKey]}</div>
34-
</React.Fragment>
33+
<tr>
34+
<td>
35+
<HotKeyPill hotKey={globalActionDefaultKeys[actionKey]}/>
36+
</td>
37+
<td>
38+
<div>{globalActionDescription[actionKey]}</div>
39+
</td>
40+
</tr>
3541
);
3642
}

0 commit comments

Comments
 (0)