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.

108 lines (92 loc) 3.92 kB
"use strict"; var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard"); Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; var React = _interopRequireWildcard(require("react")); var _styledComponents = _interopRequireWildcard(require("styled-components")); var _defaultTheme = _interopRequireDefault(require("../../defaultTheme")); var _mediaQuery = _interopRequireDefault(require("../../utils/mediaQuery")); var _index = _interopRequireDefault(require("./index")); var List = _styledComponents.default.div.withConfig({ displayName: "IllustrationPrimitiveList__List", componentId: "buozej-0" })(["display:flex;flex-flow:row wrap;justify-content:space-between;border-radius:", ";"], function (_ref) { var theme = _ref.theme; return theme.orbit.borderRadiusLarge; }); List.defaultProps = { theme: _defaultTheme.default }; var Container = _styledComponents.default.div.withConfig({ displayName: "IllustrationPrimitiveList__Container", componentId: "buozej-1" })(["display:flex;flex-direction:column;justify-content:flex-start;align-items:center;align-content:center;width:100%;min-height:80px;background-color:white;margin-bottom:", ";border-radius:", ";border:", " ", " ", ";padding:", ";", ";"], function (_ref2) { var theme = _ref2.theme; return theme.orbit.spaceLarge; }, function (_ref3) { var theme = _ref3.theme; return theme.orbit.borderRadiusLarge; }, function (_ref4) { var theme = _ref4.theme; return theme.orbit.borderWidthCard; }, function (_ref5) { var theme = _ref5.theme; return theme.orbit.borderStyleCard; }, function (_ref6) { var theme = _ref6.theme; return theme.orbit.paletteCloudNormal; }, function (_ref7) { var theme = _ref7.theme; return theme.orbit.spaceLarge; }, _mediaQuery.default.largeMobile((0, _styledComponents.css)(["flex-direction:row;"]))); Container.defaultProps = { theme: _defaultTheme.default }; var IllustrationJSX = _styledComponents.default.div.withConfig({ displayName: "IllustrationPrimitiveList__IllustrationJSX", componentId: "buozej-2" })(["font-family:\"SFMono-Regular\",Consolas,\"Liberation Mono\",Menlo,Courier,monospace;font-size:12px;line-height:", ";color:", ";background-color:", ";border:", " ", " ", ";margin-top:", ";padding:", " ", ";", ";"], function (_ref8) { var theme = _ref8.theme; return theme.orbit.lineHeightTextSmall; }, function (_ref9) { var theme = _ref9.theme; return theme.orbit.paletteInkNormal; }, function (_ref10) { var theme = _ref10.theme; return theme.orbit.paletteCloudLight; }, function (_ref11) { var theme = _ref11.theme; return theme.orbit.borderWidthCard; }, function (_ref12) { var theme = _ref12.theme; return theme.orbit.borderStyleCard; }, function (_ref13) { var theme = _ref13.theme; return theme.orbit.paletteCloudNormal; }, function (_ref14) { var theme = _ref14.theme; return theme.orbit.spaceMedium; }, function (_ref15) { var theme = _ref15.theme; return theme.orbit.spaceXXSmall; }, function (_ref16) { var theme = _ref16.theme; return theme.orbit.spaceXSmall; }, _mediaQuery.default.largeMobile((0, _styledComponents.css)(["margin:0;"]))); IllustrationJSX.defaultProps = { theme: _defaultTheme.default }; var IllustrationPrimitiveList = function IllustrationPrimitiveList(props) { return /*#__PURE__*/React.createElement(List, null, props.images.map(function (illustration) { return /*#__PURE__*/React.createElement(Container, { key: illustration }, /*#__PURE__*/React.createElement(_index.default, { name: illustration }), /*#__PURE__*/React.createElement(IllustrationJSX, null, "<".concat(props.nameOfComponent, " name=\"").concat(illustration, "\" />"))); })); }; var _default = IllustrationPrimitiveList; exports.default = _default;