Skip to content

Commit 215d1ae

Browse files
zacckjasonLaster
authored andcommitted
Convert Outline to JSX (firefox-devtools#3658)
* Convert Outline Component to jsx * execute previewFunction
1 parent 7506411 commit 215d1ae

1 file changed

Lines changed: 15 additions & 11 deletions

File tree

src/components/PrimaryPanes/Outline.js

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// @flow
22

3-
import { DOM as dom, Component } from "react";
3+
import React, { Component } from "react";
44
import { bindActionCreators } from "redux";
55
import { connect } from "react-redux";
66
import classnames from "classnames";
@@ -44,13 +44,14 @@ class Outline extends Component {
4444
renderFunction(func: SymbolDeclaration) {
4545
const { name, location } = func;
4646

47-
return dom.li(
48-
{
49-
key: `${name}:${location.start.line}:${location.start.column}`,
50-
className: "outline-list__element",
51-
onClick: () => this.selectItem(location)
52-
},
53-
previewFunction({ name })
47+
return (
48+
<li
49+
key={`${name}:${location.start.line}:${location.start.column}`}
50+
className="outline-list__element"
51+
onClick={() => this.selectItem(location)}
52+
>
53+
{previewFunction({ name })}
54+
</li>
5455
);
5556
}
5657

@@ -68,9 +69,12 @@ class Outline extends Component {
6869
return null;
6970
}
7071

71-
return dom.div(
72-
{ className: classnames("outline", { hidden: isHidden }) },
73-
dom.ul({ className: "outline-list" }, this.renderFunctions())
72+
return (
73+
<div className={classnames("outline", { hidden: isHidden })}>
74+
<ul className="outline-list">
75+
{this.renderFunctions()}
76+
</ul>
77+
</div>
7478
);
7579
}
7680
}

0 commit comments

Comments
 (0)