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.

26 lines (25 loc) 844 B
"use client"; import * as React from "react"; import cx from "clsx"; import Divider from "./Divider"; import useTheme from "../../hooks/useTheme"; const ItinerarySeparator = ({ children, type, color }) => { const theme = useTheme(); if (children || type) return /*#__PURE__*/React.createElement("div", { className: "relative flex w-full justify-center" }, /*#__PURE__*/React.createElement("div", { className: cx("bg-elevation-flat-border-color absolute inset-x-0 top-1/2 z-10 w-full", type ? "border" : "h-px"), style: { borderStyle: type, borderColor: color && theme.orbit[color] } }), /*#__PURE__*/React.createElement("div", { className: "px-50 bg-white-normal relative z-[11] py-0" }, children)); return /*#__PURE__*/React.createElement(Divider, null); }; export default ItinerarySeparator;