Dashboard sipadu mbip
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. "use strict";
  2. var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
  3. if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
  4. return cooked;
  5. };
  6. var __extends = (this && this.__extends) || (function () {
  7. var extendStatics = function (d, b) {
  8. extendStatics = Object.setPrototypeOf ||
  9. ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
  10. function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
  11. return extendStatics(d, b);
  12. };
  13. return function (d, b) {
  14. extendStatics(d, b);
  15. function __() { this.constructor = d; }
  16. d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
  17. };
  18. })();
  19. var __importStar = (this && this.__importStar) || function (mod) {
  20. if (mod && mod.__esModule) return mod;
  21. var result = {};
  22. if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
  23. result["default"] = mod;
  24. return result;
  25. };
  26. Object.defineProperty(exports, "__esModule", { value: true });
  27. /** @jsx jsx */
  28. var React = __importStar(require("react"));
  29. var core_1 = require("@emotion/core");
  30. var helpers_1 = require("./helpers");
  31. var beat = core_1.keyframes(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n 50% {transform: scale(0.75);opacity: 0.2}\n 100% {transform: scale(1);opacity: 1}\n"], ["\n 50% {transform: scale(0.75);opacity: 0.2}\n 100% {transform: scale(1);opacity: 1}\n"])));
  32. var Loader = /** @class */ (function (_super) {
  33. __extends(Loader, _super);
  34. function Loader() {
  35. var _this = _super !== null && _super.apply(this, arguments) || this;
  36. _this.style = function (i) {
  37. var _a = _this.props, color = _a.color, size = _a.size, sizeUnit = _a.sizeUnit, margin = _a.margin;
  38. return core_1.css(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n display: inline-block;\n background-color: ", ";\n width: ", ";\n height: ", ";\n margin: ", ";\n border-radius: 100%;\n animation: ", " 0.7s ", " infinite linear;\n animation-fill-mode: both;\n "], ["\n display: inline-block;\n background-color: ", ";\n width: ", ";\n height: ", ";\n margin: ", ";\n border-radius: 100%;\n animation: ", " 0.7s ", " infinite linear;\n animation-fill-mode: both;\n "])), color, "" + size + sizeUnit, "" + size + sizeUnit, margin, beat, i % 2 ? "0s" : "0.35s");
  39. };
  40. return _this;
  41. }
  42. Loader.prototype.render = function () {
  43. var _a = this.props, loading = _a.loading, css = _a.css;
  44. return loading ? (core_1.jsx("div", { css: [css] },
  45. core_1.jsx("div", { css: this.style(1) }),
  46. core_1.jsx("div", { css: this.style(2) }),
  47. core_1.jsx("div", { css: this.style(3) }))) : null;
  48. };
  49. Loader.defaultProps = helpers_1.sizeMarginDefaults(15);
  50. return Loader;
  51. }(React.PureComponent));
  52. exports.default = Loader;
  53. var templateObject_1, templateObject_2;