react-web-native-sketch
Version:
[TODO: We need an overview of how this can be used via npm vs as a local package]
60 lines • 2.54 kB
JavaScript
;
/**
* Created by alexbuicescu on 19 - Mar 2018.
*/
var __extends = (this && this.__extends) || (function () {
var extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
return function (d, b) {
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
var __assign = (this && this.__assign) || Object.assign || function(t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
s = arguments[i];
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
t[p] = s[p];
}
return t;
};
Object.defineProperty(exports, "__esModule", { value: true });
var core_1 = require("@material-ui/core");
var React = require("react");
var theme_1 = require("../../utils/theme");
var __1 = require("../../");
var enums_1 = require("../../utils/enums");
var web_1 = require("../../utils/web");
var styles = function () { return ({
progress: {
color: theme_1.appTheme.primaryColor,
}
}); };
var CCircularProgressComponent = /** @class */ (function (_super) {
__extends(CCircularProgressComponent, _super);
function CCircularProgressComponent() {
return _super !== null && _super.apply(this, arguments) || this;
}
CCircularProgressComponent.prototype.render = function () {
var _a = this.props, style = _a.style, size = _a.size, thickness = _a.thickness;
var progressSize = 0;
switch (size) {
case enums_1.CIRCULAR_PROGRESS_SIZE.LARGE:
progressSize = 100;
thickness = thickness || 7;
break;
case enums_1.CIRCULAR_PROGRESS_SIZE.SMALL:
default:
progressSize = 32;
thickness = thickness || 3;
break;
}
return (React.createElement(core_1.CircularProgress, __assign({}, web_1.getStyleProps([{ color: theme_1.appTheme.primaryColor, display: 'block important' }, style]), { size: progressSize, thickness: thickness })));
};
return CCircularProgressComponent;
}(React.PureComponent));
var componentName = 'CircularProgressComponent';
exports.CircularProgressComponent = __1.createStyles(styles, componentName)(CCircularProgressComponent);
//# sourceMappingURL=CircularProgressComponent.js.map