@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.
59 lines (57 loc) • 2.36 kB
JavaScript
import * as React from "react";
import styled from "styled-components";
import StyledRelative from "../primitives/StyledRelative";
import StyledIconWrapper from "../primitives/StyledIconWrapper";
import StyledProgressLine from "../primitives/StyledProgressLine";
import StyledText from "../primitives/StyledText";
import CustomBadge from "./CustomBadge";
import Badge from "../../../Badge";
import Text from "../../../Text";
import Stack from "../../../Stack";
var StyledDescription = styled.div.withConfig({
displayName: "TimelineStepDesktop__StyledDescription",
componentId: "p9q3nw-0"
})(["max-width:250px;width:100%;"]);
var StyledAligned = styled.div.withConfig({
displayName: "TimelineStepDesktop__StyledAligned",
componentId: "p9q3nw-1"
})(["text-align:center;"]);
var TimelineStepDesktop = function TimelineStepDesktop(_ref) {
var type = _ref.type,
last = _ref.last,
nextType = _ref.nextType,
children = _ref.children,
label = _ref.label,
subLabel = _ref.subLabel,
typeIcon = _ref.typeIcon;
return /*#__PURE__*/React.createElement(Stack, {
inline: true,
shrink: true,
direction: "column",
align: "center",
spaceAfter: "large"
}, /*#__PURE__*/React.createElement(StyledText, null, /*#__PURE__*/React.createElement(Text, {
size: "small"
}, subLabel)), /*#__PURE__*/React.createElement(StyledRelative, {
inner: true
}, /*#__PURE__*/React.createElement(StyledProgressLine, {
"data-test": "progressLine",
desktop: true,
status: type
}), /*#__PURE__*/React.createElement(StyledIconWrapper, null, typeIcon), /*#__PURE__*/React.createElement(StyledProgressLine, {
"data-test": "progressLine",
desktop: true,
status: nextType || last && type
})), /*#__PURE__*/React.createElement(Stack, {
flex: true,
align: "center",
spacing: "condensed",
direction: "column"
}, !type ? /*#__PURE__*/React.createElement(CustomBadge, null, /*#__PURE__*/React.createElement(StyledAligned, null, label)) : /*#__PURE__*/React.createElement(Badge, {
type: type
}, /*#__PURE__*/React.createElement(StyledAligned, null, label)), /*#__PURE__*/React.createElement(StyledDescription, null, /*#__PURE__*/React.createElement(Text, {
align: "center",
type: type ? "primary" : "secondary"
}, children))));
};
export default TimelineStepDesktop;