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    
@bmc/react-common / dist / LoaderButton.js
Size: Mime:
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
import React from 'react';
import { Button } from 'react-bootstrap';
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
import { faSync } from '@fortawesome/free-solid-svg-icons';
export default (function (_ref) {
  var isLoading = _ref.isLoading,
      text = _ref.text,
      loadingText = _ref.loadingText,
      _ref$disabled = _ref.disabled,
      disabled = _ref$disabled === void 0 ? false : _ref$disabled,
      props = _objectWithoutProperties(_ref, ["isLoading", "text", "loadingText", "disabled"]);

  return React.createElement(Button, Object.assign({
    disabled: disabled || isLoading
  }, props), isLoading && React.createElement(FontAwesomeIcon, {
    icon: faSync,
    spin: true
  }), !isLoading ? text : loadingText);
});
//# sourceMappingURL=LoaderButton.js.map