Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
Object.keys(features).map(key => dom.li(
{
className: "tab tab-sides",
key
},
dom.div({ className: "tab-title" },
typeof features[key] == "object" ?
features[key].label :
key
),
dom.div({ className: "tab-value" },
dom.input(
{
type: "checkbox",
defaultChecked: features[key].enabled,
onChange: e => this.onInputHandler(e, `features.${key}.enabled`)
},
configs.map(c => {
return dom.li({ key: c.name, className: "tab tab-sides" },
dom.div({ className: "tab-title" }, c.label),
c.bool ? dom.input({
type: "checkbox",
defaultChecked: config[c.name],
onChange: e => this.onInputHandler(e, c.name)
}, null) : dom.div({
className: "tab-value",
onClick: e => this.onConfigContextMenu(e, c.name)
}, config[c.name])
);
})
);
renderItem(title) {
const selected = title == this.props.selectedPane;
let displayTitle;
if (title === "Firefox") {
displayTitle = "Firefox Nightly";
}
return dom.li(
{ key: title },
dom.a(
{
"aria-current": selected ? "page" : undefined,
href: "#" + title,
onClick: () => {
this.props.onSideBarItemClick(title);
}
},
displayTitle || title
)
);
}
tab => dom.li({
className: classnames("tab", {
active: targets.size === 1
}),
key: tab.get("id"),
tabIndex: 0,
role: "link",
onClick: () => this.onTabClick(tab, paramName),
onKeyDown: e => {
if (e.keyCode === 13) {
this.onTabClick(tab, paramName);
}
}
},
dom.div({ className: "tab-title" }, tab.get("title")),
dom.div({ className: "tab-url" }, tab.get("url"))
)