How to use the react-dom-factories.input 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 researchspace / researchspace / researchspace / web / src / main / components / annotations / AnnotationTextEditorComponent.ts View on Github external
renderLinkEditor(show: boolean, buttonRef: string, onConfirmUrl: Function) {
    return Overlay(
      {
        show: show,
        placement: 'bottom',
        container: document.body,
        target: () => this.refs[buttonRef],
      },
      Popover({id: 'popover'},
        D.div({className: 'input-group'},
          D.input({
            ref: 'url-input',
            className: 'form-control input-sm',
            type: 'text',
            value: this.state.urlValue,
            onChange: (e) => {
              const value = (e.target as any).value;
              this.setState({urlValue: value});
            },
            onKeyDown: (e: KeyboardEvent) => {
              if (e.which === 13 && this.state.urlValue !== '') { // enter
                onConfirmUrl();
              } else if (e.which === 27) { // esc
                this.hideLinkEditor();
              }
            },
          }),
github researchspace / researchspace / researchspace / web / src / main / components / iiif / mirador / AnnotationBodyEditor.ts View on Github external
private renderReactElement() {
    return D.div(
      {className: 'annotation-body-editor'},
      D.input({
        className: 'annotation-body-editor__title-field',
        placeholder: 'Title',
        defaultValue: this.originalRegionTitle,
        onChange: event => {
          this.changedRegionTitle = (event.target as HTMLInputElement).value;
        },
      }));
  }
github researchspace / researchspace / researchspace / web / src / main / components / search / profiles / CreateProfileDialog.ts View on Github external
private dialogBody() {
    return ModalBody(
      {},
      this.showMessage(),
      D.form(
        {
          className: 'new-profile-modal__form',
        },
        D.input(
          {
            className: this.inputClassName(
              'new-profile-modal__form__profile-name',
              this.state.inputValidationState.name
            ),
            placeholder: 'Profile Name',
            type: 'text',
            required: true,
            ref: CreateProfileDialogClass.nameInputRef,
          }
        ),
        D.textarea(
          {
            className: this.inputClassName(
              'new-profile-modal__form__profile-description',
              this.state.inputValidationState.description
github iMerica / django-react-csrftoken / src / index.js View on Github external
render() {
    return (
      DOM.input(
        {
          type: 'hidden',
          name: 'csrfmiddlewaretoken',
          value: this.state.csrfToken
        }
      )
    );
  }
}
github firefox-devtools / devtools-core / packages / devtools-launchpad / src / components / LandingPage.js View on Github external
renderFilter() {
    const { selectedPane } = this.state;

    const { tabs, filterString = "" } = this.props;

    const { clientType, paramName } = sidePanelItems[selectedPane];

    const targets = getTabsByClientType(tabs, clientType);

    return dom.header(
      {},
      dom.input({
        ref: node => {
          this.filterInput = node;
        },
        placeholder: "Filter tabs",
        value: filterString,
        autoFocus: true,
        type: "search",
        onChange: e => this.onFilterChange(e.target.value),
        onKeyDown: e => {
          if (targets.size === 1 && e.keyCode === 13) {
            this.onTabClick(targets.first(), paramName);
          }
        }
      })
    );
  }