How to use the react-dom-factories.li function in react-dom-factories

To help you get started, we’ve selected a few react-dom-factories examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github firefox-devtools / devtools-core / packages / devtools-launchpad / src / components / Settings.js View on Github external
      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`)
            },
github firefox-devtools / devtools-core / packages / devtools-launchpad / src / components / Settings.js View on Github external
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])
        );
      })
    );
github firefox-devtools / devtools-core / packages / devtools-launchpad / src / components / Sidebar.js View on Github external
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
      )
    );
  }
github firefox-devtools / devtools-core / packages / devtools-launchpad / src / components / Tabs.js View on Github external
          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"))
          )