UNPKG

@up-group/react-controls

Version:

We know that there are a ton of react UI library projects to choose from. Our hope with this one is to provide the next generation of react components that you can use to bootstrap your next project, or as a reference for building a UIKit. Read on to get

95 lines 3.59 kB
"use strict"; 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 __()); }; })(); Object.defineProperty(exports, "__esModule", { value: true }); var React = require("react"); var index_1 = require("../SvgIcon/index"); var index_2 = require("../../Display/Tooltip/index"); var UpLogoAlerte = (function (_super) { __extends(UpLogoAlerte, _super); function UpLogoAlerte(p, c) { var _this = _super.call(this, p, c) || this; _this.state = {}; return _this; } UpLogoAlerte.prototype.render = function () { var styleLogoAlerte = { width: 50, margin: "0 5px" }; var backgroundColor = "green"; var borderColor = "green"; var texteColor = "green"; switch (this.props.intenet) { case 'primary': backgroundColor = "#0073b7"; borderColor = "#addaf1"; texteColor = "#337ab7"; break; case 'danger': backgroundColor = "#dd4b39"; borderColor = "#eea59c"; texteColor = "#a94442"; break; case 'warning': backgroundColor = "#f39c12"; borderColor = "#f9cd88"; texteColor = "#f39c12"; break; case 'success': backgroundColor = "#00a65a"; borderColor = "#7FD2AC"; texteColor = "#3c763d"; break; case 'info': case 'default': default: backgroundColor = "#3c8dbc"; borderColor = "#7FDFF7"; texteColor = "#00c0ef"; break; } var StyleLogoAlerteIcon = { backgroundColor: backgroundColor, borderRadius: "35px", boxShadow: "1px 1px 8px #aaa", fontSize: "24px", height: "50px", lineHeight: "36px", textAlign: "center", width: "50px", border: "7px solid " + borderColor, padding: "0px 4px" }; var styleTexteLogo = { display: " block", textAlign: "center", fontWeight: 300, fontSize: 30, color: texteColor }; return React.createElement(index_2.default, { content: this.props.title }, React.createElement("div", { style: styleLogoAlerte }, React.createElement("div", { style: StyleLogoAlerteIcon, className: "logoAlerte" }, React.createElement(index_1.default, { height: 24, iconName: this.props.icon })), React.createElement("div", { style: styleTexteLogo }, React.createElement("span", null, this.props.alerteNumber)))); }; UpLogoAlerte.defaultProps = { intenet: "default", alerteNumber: 0, title: "", icon: "none" }; return UpLogoAlerte; }(React.Component)); exports.default = UpLogoAlerte; //# sourceMappingURL=UpLogoAlerte.js.map