Repository URL to install this package:
|
Version:
0.4.9 ▾
|
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