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.

43 lines (42 loc) 1.27 kB
"use client"; import * as React from "react"; import { ItemWrapper, VerticalBadge, BadgeContent } from "../../BadgeList/BadgeListItem"; import Stack from "../../Stack"; import ItineraryText from "../ItineraryText"; const ItineraryBadgeListItem = ({ children, cancelledValue, withBackground, dataTest, type = "neutral", icon, strikeThrough }) => { return /*#__PURE__*/React.createElement(ItemWrapper, { dataTest: dataTest }, /*#__PURE__*/React.createElement(VerticalBadge, { type: type, icon: icon }), /*#__PURE__*/React.createElement(BadgeContent, { style: { marginTop: cancelledValue ? `4px` : "" } }, /*#__PURE__*/React.createElement(Stack, { direction: "column", spacing: "100" }, /*#__PURE__*/React.createElement(ItineraryText, { withBackground: withBackground, type: withBackground && type !== "neutral" ? type : "secondary", weight: withBackground ? "medium" : "normal", size: "small", as: "span", strikeThrough: strikeThrough }, children), cancelledValue && /*#__PURE__*/React.createElement(ItineraryText, { type: "secondary", size: "small", as: "span", strikeThrough: true, weight: "medium" }, cancelledValue)))); }; export default ItineraryBadgeListItem;