render()

in src/components/application/launch/sections/wdl-script/upload-wdl-button.js [39:85]


  render() {
    const {
      disabled,
      onFetch,
      onUpload,
    } = this.props;
    const {
      popoverVisible,
      url,
    } = this.state;
    return (
      <Button.Group>
        <Upload {...generateUploadOptions(onUpload)}>
          <Button
            disabled={disabled}
            style={{
              borderTopLeftRadius: 4,
              borderBottomLeftRadius: 4,
            }}
          >
            <Icon type="upload" />
            Upload WDL script
          </Button>
        </Upload>
        <Popover
          trigger="click"
          title="Load WDL script from URL"
          content={(
            <FetchWorkflowPopup
              className={styles.loadFromUrlPopover}
              inputClassName={styles.loadFromUrlInput}
              onChange={this.onWorkflowUrlChanged}
              onFetch={onFetch}
              pending={disabled}
              url={url}
            />
          )}
          visible={popoverVisible}
          onVisibleChange={this.onPopoverVisibilityChanged}
        >
          <Button disabled={disabled}>
            <Icon type="down" />
          </Button>
        </Popover>
      </Button.Group>
    );
  }