How to use the inferno-create-element function in inferno-create-element

To help you get started, we’ve selected a few inferno-create-element 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 anticensority / runet-censorship-bypass / extensions / chromium / runet-censorship-bypass / src / extension-common / pages / options / src / components / InfoLi.js View on Github external
const inputProps = {
      id: iddy,
      name: props.name,
      type: props.type,
      checked: props.checked,
      onClick: props.onClick,
      onChange: props.onChange,
      class: props.class,
      disabled: props.ifInputsDisabled,
    };
    delete inputProps.children;

    return (
      <li style="{" class="{scopedCss.infoRow">
        {createElement('input', inputProps)}
        <div class="{scopedCss.labelContainer}">
          <label for="{iddy}"></label>
          {props.nodeAfterLabel}
        </div>
        {props.conf.desc
          ? (
            <div class="{scopedCss.desc}">
              
              <div class="{scopedCss.tooltip}">
            </div>)
          : (props.conf.url
              ? (<a title="Открыть документацию" class="{[scopedCss.rightBottomIcon," href="{props.conf.url}"></a>)
              : (<span>&nbsp;</span>) // Affects vertical align of flexbox items.
            )
        }
        {/* props.checked &amp;&amp; props.children */}</div></li>
github styletron / styletron / packages / styletron-inferno / src / __tests__ / browser.js View on Github external
const MockComponent = (props, context) => {
    t.equal(
      context.styletron,
      mockStyletronInstance,
      'Styletron instance on component context'
    );
    return createElement('div');
  };

  InfernoTestUtils.renderIntoDocument(
    createElement(
      Provider,
      {
        styletron: mockStyletronInstance,
      },
      createElement(MockComponent)
    )
  );
});
github styletron / styletron / packages / styletron-inferno / src / __tests__ / browser.js View on Github external
render() {
      return createElement(StyledInnerComponent, {
        foo: 'bar',
        innerRef: innerComponent => {
          t.ok(
            InfernoTestUtils.isRenderedClassComponentOfType(
              innerComponent,
              InnerComponent
            ),
            'is InnerComponent'
          );
          this.innerComponent = innerComponent;
        },
      });
    }
  }
github anticensority / runet-censorship-bypass / extensions / chromium / runet-censorship-bypass / src / extension-common / pages / options / src / components / PacChooser.js View on Github external
{
              [...theState.apis.antiCensorRu.getSortedEntriesForProviders(), {key: 'none', label: chrome.i18n.getMessage('Disable')}].map((provConf) =&gt;
                ([{chrome.i18n.getMessage('update')}]}
                /&gt;)
              )
            }
          
          <div style="align-items: center" class="horFlex" id="updateMessage">
            { createElement(LastUpdateDate, props) }
            <div class="{scopedCss.fullLineHeight}">
              {
                props.flags.ifMini
                  ? (<a title="{chrome.i18n.getMessage(&quot;FullVersion&quot;)}" href="https://rebrand.ly/ac-versions" class="{scopedCss.otherVersion">🏋</a>)
                  : (<a title="{chrome.i18n.getMessage(&quot;VersionForSlowMachines&quot;)}" href="https://rebrand.ly/ac-versions" class="{scopedCss.otherVersion">🐌</a>)
              }
            </div>
          </div>
        
      );

    }
github anticensority / runet-censorship-bypass / extensions / chromium / runet-censorship-bypass / src / extension-common / pages / options / src / components / App.js View on Github external
render(originalProps) {

      const props = Object.assign({}, originalProps, {
        funs: {
          setStatusTo: this.setStatusTo,
          conduct: this.conduct,
          showErrors: this.showErrors,
          showNews: this.showNews,
        },
        ifInputsDisabled: this.state.ifInputsDisabled,
        hashParams: this.state.hashParams,
      });

      return createElement('div', null, [
        ...( props.flags.ifNotControlled ? [createElement(NotControlledWarning, props)] : [] ),
        createElement(Main, props),
        createElement(Footer, Object.assign({ status: this.state.status }, props)),
      ]);

    }
github anticensority / runet-censorship-bypass / extensions / chromium / runet-censorship-bypass / src / extension-common / pages / options / src / components / Main.js View on Github external
render(props) {

      const applyModsEl = createElement(ApplyMods, Object.assign({}, props,
        {
          ifInputsDisabled: !this.state.ifModsChangesAreStashed || props.ifInputsDisabled,
          onClick: linkEvent(this, this.handleModApply),
        }
      ));

      const modsHandlers = {
        onConfChanged: this.handleModChange,
      };

      return createElement(TabPanel, Object.assign({}, props, {
        tabs: [
          {
            label: chrome.i18n.getMessage('PAC_script'),
            content: createElement(PacChooser, props),
            key: 'pacScript',
github infernojs / inferno / packages / inferno-router / src / createRoutes.ts View on Github external
const handleIndexRoute = (indexRouteNode: IPlainRouteConfig): VNode =>
  createElement(Route, indexRouteNode);
const handleChildRoute = (childRouteNode: IPlainRouteConfig): VNode =>
github anticensority / runet-censorship-bypass / extensions / chromium / runet-censorship-bypass / src / extension-common / pages / options / src / components / Main.js View on Github external
if (input) {
                          input.focus();
                          input.selectionStart = selection[0];
                          input.selectionEnd = selection[1];
                        }
                      }}
                    />),
                },
                name: checksName,
              }, modsHandlers)
            ),
            key: 'ownProxies',
          },
          {
            label: chrome.i18n.getMessage('Modifiers'),
            content: createElement(
              ModList,
              Object.assign({}, props, {
                orderedConfigs: this.state.catToOrderedMods['general'],
                name: checksName,
              }, modsHandlers)
            ),
            key: 'mods',
          },
          {
            content: applyModsEl,
            key: 'applyMods',
          },
          {
            label: chrome.i18n.getMessage('Notifications'),
            content: createElement(Notifications, props),
            key: 'notifications',
github anticensority / runet-censorship-bypass / extensions / chromium / runet-censorship-bypass / src / extension-common / pages / options / src / components / Main.js View on Github external
render(props) {

      const applyModsEl = createElement(ApplyMods, Object.assign({}, props,
        {
          ifInputsDisabled: !this.state.ifModsChangesAreStashed || props.ifInputsDisabled,
          onClick: linkEvent(this, this.handleModApply),
        }
      ));

      const modsHandlers = {
        onConfChanged: this.handleModChange,
      };

      return createElement(TabPanel, Object.assign({}, props, {
        tabs: [
          {
            label: chrome.i18n.getMessage('PAC_script'),
            content: createElement(PacChooser, props),
            key: 'pacScript',
          },
          {
            label: chrome.i18n.getMessage('Exceptions'),
            content: createElement(Exceptions, props),
            key: 'exceptions',
          },
          {
            label: chrome.i18n.getMessage('Own_proxies'),
            content: createElement(
              ModList,
              Object.assign({}, props, {
github anticensority / runet-censorship-bypass / extensions / chromium / runet-censorship-bypass / src / extension-common / pages / options / src / components / Main.js View on Github external
content: createElement(
              ModList,
              Object.assign({}, props, {
                orderedConfigs: this.state.catToOrderedMods['general'],
                name: checksName,
              }, modsHandlers)
            ),
            key: 'mods',
          },
          {
            content: applyModsEl,
            key: 'applyMods',
          },
          {
            label: chrome.i18n.getMessage('Notifications'),
            content: createElement(Notifications, props),
            key: 'notifications',
          },
        ],
        alwaysShownWith: {
          'applyMods': ['ownProxies', 'mods'],
        },
      }));

    }

inferno-create-element

Provides methods to create Inferno VNodes

MIT
Latest version published 5 months ago

Package Health Score

84 / 100
Full package analysis