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.

52 lines 1.63 kB
import * as React from "react"; import StyledRelative from "../primitives/StyledRelative"; import Text from "../../../Text"; import Stack from "../../../Stack"; import StyledProgressLine from "../primitives/StyledProgressLine"; import TypeIcon from "./TypeIcon"; import StyledText from "../primitives/StyledText"; const TimelineStepMobile = ({ type, subLabel, label, nextType, children, active, last }) => { return /*#__PURE__*/React.createElement(StyledRelative, null, /*#__PURE__*/React.createElement(Stack, { flex: true, spaceAfter: "large", align: "stretch", desktop: { align: "start" } }, /*#__PURE__*/React.createElement(TypeIcon, { type: type, active: !!active, mobile: true }), !last && /*#__PURE__*/React.createElement(StyledProgressLine, { status: nextType, prevStatus: type }), /*#__PURE__*/React.createElement(Stack, { flex: true, shrink: true, direction: "column", spacing: "XXSmall" }, /*#__PURE__*/React.createElement(Stack, { flex: true, direction: "column", spacing: "XXSmall" }, /*#__PURE__*/React.createElement(StyledText, { active: active || last && type === "success" }, /*#__PURE__*/React.createElement(Text, { weight: "bold" }, label)), subLabel && /*#__PURE__*/React.createElement(StyledText, { active: active }, /*#__PURE__*/React.createElement(Text, { size: "small" }, subLabel))), /*#__PURE__*/React.createElement(StyledText, { active: active || last && type === "success" }, /*#__PURE__*/React.createElement(Text, null, children))))); }; export default TimelineStepMobile;