@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.
24 lines (22 loc) • 1.01 kB
JavaScript
import styled, { css } from "styled-components";
import { left } from "../../../utils/rtl";
import defaultTheme from "../../../defaultTheme";
var renderStatus = function 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;
};
var StyledProgressLine = styled.span.withConfig({
displayName: "StyledProgressLine",
componentId: "sc-1yvg893-0"
})(["", ""], function (_ref) {
var desktop = _ref.desktop,
theme = _ref.theme,
status = _ref.status;
return css(["", ";", ";width:", ";", ":11px;background:", ";height:", ";"], !desktop && "position: absolute", !desktop && "top: 18px", desktop ? "50%" : "2px", left, renderStatus(status, theme), desktop ? "2px" : "calc(100% + 4px)");
});
StyledProgressLine.defaultProps = {
theme: defaultTheme
};
export default StyledProgressLine;