Why Gemfury? Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Debian packages RPM packages NuGet packages

Repository URL to install this package:

Details    
Size: Mime:
"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});

const tslib_1 = require("tslib");

const react_1 = tslib_1.__importDefault(require("react"));

const exotic_1 = require("exotic");

const mobx_react_1 = require("xmobx/mobx-react");

const forms_1 = require("../../../../../forms");

const FormState_1 = require("./FormState");

const fixture_1 = require("./fixture");

const styled_1 = require("./styled");

const formStateCard = new FormState_1.FormStateCard();

class FormButton extends react_1.default.PureComponent {
  render() {
    return react_1.default.createElement(styled_1.StyledPrimaryButton, Object.assign({}, this.props, {
      "data-qa": 'qa-submit-form-button'
    }));
  }

}

let SignUpForm = class SignUpForm extends forms_1.ObservableForm {
  constructor() {
    super(...arguments);
    this.SubmitButton = FormButton;
    this.defaultSubmitButtonLabel = fixture_1.wording.submitButton;

    this.handleSubmit = event => {
      const {
        onSignUpClick
      } = this.props;
      event.preventDefault();

      if (this.validateForm()) {
        if (exotic_1.isFunction(onSignUpClick)) {
          const changeArgs = {
            event
          };
          onSignUpClick(this.state);
        }
      }
    };
  }

};
SignUpForm.FormState = formStateCard;
SignUpForm.defaultProps = {
  state: formStateCard
};
SignUpForm = tslib_1.__decorate([mobx_react_1.observer], SignUpForm);

class SignUpFormView extends react_1.default.PureComponent {
  render() {
    return react_1.default.createElement(styled_1.SignUpFormWrapper, null, react_1.default.createElement(SignUpForm, Object.assign({}, this.props)));
  }

}

exports.SignUpFormView = SignUpFormView;
exports.default = SignUpFormView; //# sourceMappingURL=Form.js.map