@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.
29 lines (26 loc) • 1.33 kB
JavaScript
import * as React from "react";
import styled, { css } from "styled-components";
import defaultTheme from "../../../defaultTheme";
import { StyledSeparator } from "../../../Separator";
import ChevronRight from "../../../icons/ChevronRight";
import { StyledWrapper as StyledBadgeListWrapper } from "../../ItineraryBadgeList";
const StyledBannerWrapper = styled.div.withConfig({
displayName: "ItinerarySegmentBanner__StyledBannerWrapper",
componentId: "sc-k4zimz-0"
})(["", ""], ({
theme
}) => css(["display:flex;align-items:center;justify-content:space-between;width:100%;overflow:hidden;box-sizing:border-box;padding:0 ", ";", "{margin-left:0 !important;}", "{width:150% !important;margin-left:-", ";}& > div{max-width:calc(100% - 20px);}"], theme.orbit.spaceMedium, StyledBadgeListWrapper, StyledSeparator, theme.orbit.spaceMedium)); // $FlowFixMe: https://github.com/flow-typed/flow-typed/issues/3653#issuecomment-568539198
StyledBannerWrapper.defaultProps = {
theme: defaultTheme
};
const ItinerarySegmentBanner = ({
onClick,
children
}) => {
return /*#__PURE__*/React.createElement(StyledBannerWrapper, {
onClick: onClick
}, /*#__PURE__*/React.createElement("div", null, children), /*#__PURE__*/React.createElement(ChevronRight, {
color: "secondary"
}));
};
export default ItinerarySegmentBanner;