UNPKG

@kiwicom/orbit-components

Version:

Orbit-components is a React component library which provides developers with the easiest possible way of building Kiwi.com’s products.

39 lines (29 loc) 1.45 kB
"use strict"; var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default; var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; var _styledComponents = _interopRequireWildcard(require("styled-components")); var _rtl = require("../../../utils/rtl"); var _defaultTheme = _interopRequireDefault(require("../../../defaultTheme")); const renderStatus = (type, theme) => { if (type === "success") return theme.orbit.colorTextSuccess; if (type === "warning") return theme.orbit.colorTextWarning; if (type === "critical") return theme.orbit.colorTextCritical; return theme.orbit.paletteCloudNormalHover; }; const StyledProgressLine = _styledComponents.default.span.withConfig({ displayName: "StyledProgressLine", componentId: "sc-1yvg893-0" })(["", ""], ({ desktop, theme, status }) => (0, _styledComponents.css)(["", ";", ";width:", ";", ":11px;background:", ";height:", ";"], !desktop && `position: absolute`, !desktop && `top: 18px`, desktop ? "50%" : "2px", _rtl.left, renderStatus(status, theme), desktop ? `2px` : `calc(100% + 4px)`)); // $FlowFixMe: https://github.com/flow-typed/flow-typed/issues/3653#issuecomment-568539198 StyledProgressLine.defaultProps = { theme: _defaultTheme.default }; var _default = StyledProgressLine; exports.default = _default;