UNPKG

@activecollab/components

Version:

ActiveCollab Components

39 lines (38 loc) 2.6 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.StyledBadge = void 0; var _styledComponents = _interopRequireWildcard(require("styled-components")); var _FontStyle = require("../FontStyle"); function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); } var StyledBadge = exports.StyledBadge = _styledComponents.default.div.withConfig({ displayName: "Styles__StyledBadge", componentId: "sc-6o8do5-0" })(["", " align-items:center;background-color:", ";border:", ";block-size:", ";border-radius:100%;color:var(--color-theme-100);display:flex;font-size:10px;font-weight:500;inline-size:", ";justify-content:center;padding:", ";pointer-events:none;position:absolute;z-index:1;", " ", " ", " ", " ", ""], _FontStyle.FontStyle, function (props) { return !props.backgroundColor ? "var(--color-primary)" : props.backgroundColor; }, function (props) { return props.isStandalone ? "none" : "2px solid var(--page-paper-main)"; }, function (props) { return props.dimension + "px"; }, function (props) { return props.dimension + "px"; }, function (props) { return props.value && (props.value > 99 ? "4px" : props.value < 100 && "2px"); }, function (_ref) { var isStandalone = _ref.isStandalone; return isStandalone && (0, _styledComponents.css)(["position:static;z-index:0;"]); }, function (_ref2) { var position = _ref2.position; return position === "top-left" && (0, _styledComponents.css)(["inset-block-start:0;inset-inline-start:0;"]); }, function (_ref3) { var position = _ref3.position; return position === "top-right" && (0, _styledComponents.css)(["inset-block-start:0;inset-inline-end:0;"]); }, function (_ref4) { var position = _ref4.position; return position === "bottom-right" && (0, _styledComponents.css)(["inset-block-end:0;inset-inline-end:0;"]); }, function (_ref5) { var position = _ref5.position; return position === "bottom-left" && (0, _styledComponents.css)(["inset-block-end:0;inset-inline-start:0;"]); }); //# sourceMappingURL=Styles.js.map