react-sleek
Version:
React Sleek Component Library
46 lines (45 loc) • 1.64 kB
JavaScript
;
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
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 extendStatics(d, b);
};
return function (d, b) {
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
var React = require("react");
var typestyle_1 = require("typestyle");
var Colors_1 = require("../../Style/Colors");
var csx_1 = require("csx");
var StatusDot = /** @class */ (function (_super) {
__extends(StatusDot, _super);
function StatusDot() {
return _super !== null && _super.apply(this, arguments) || this;
}
StatusDot.prototype.render = function () {
var buttonStyle = typestyle_1.style({
backgroundColor: this.props.color,
});
return React.createElement("div", { className: typestyle_1.classes(styles.dot, buttonStyle), title: this.props.title });
};
StatusDot.defaultProps = {
title: '',
color: Colors_1.default.Green,
};
return StatusDot;
}(React.PureComponent));
exports.default = StatusDot;
var styles = {
dot: typestyle_1.style({
userSelect: 'none',
borderRadius: csx_1.px(5),
width: csx_1.px(10),
height: csx_1.px(10),
}),
};