@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.
53 lines • 1.57 kB
JavaScript
import * as React from "react";
import Text from "../../../Text";
import Stack from "../../../Stack";
import ProgressLine from "./ProgressLine";
import TypeIcon from "./TypeIcon";
import TextWrapper from "./TextWrapper";
const TimelineStepMobile = ({
type,
subLabel,
label,
nextType,
children,
active,
last
}) => {
return /*#__PURE__*/React.createElement("li", {
className: "relative"
}, /*#__PURE__*/React.createElement(Stack, {
flex: true,
spaceAfter: last ? undefined : "large",
align: "stretch",
desktop: {
align: "start"
}
}, /*#__PURE__*/React.createElement(TypeIcon, {
type: type,
active: !!active,
mobile: true
}), !last && /*#__PURE__*/React.createElement(ProgressLine, {
status: nextType,
prevStatus: type
}), /*#__PURE__*/React.createElement(Stack, {
flex: true,
shrink: true,
direction: "column",
spacing: "100"
}, /*#__PURE__*/React.createElement(Stack, {
flex: true,
direction: "column",
spacing: "100"
}, /*#__PURE__*/React.createElement(TextWrapper, {
active: active || last && type === "success"
}, /*#__PURE__*/React.createElement(Text, {
weight: "bold"
}, label)), subLabel && /*#__PURE__*/React.createElement(TextWrapper, {
active: active
}, /*#__PURE__*/React.createElement(Text, {
size: "small"
}, subLabel))), children && /*#__PURE__*/React.createElement(TextWrapper, {
active: active || last && type === "success"
}, /*#__PURE__*/React.createElement(Text, null, children)))));
};
export default TimelineStepMobile;