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.

110 lines (93 loc) 4.22 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; var React = _interopRequireWildcard(require("react")); var _styledComponents = _interopRequireWildcard(require("styled-components")); var _consts = require("./consts"); var _defaultTheme = _interopRequireDefault(require("../defaultTheme")); var _mediaQuery = _interopRequireDefault(require("../utils/mediaQuery")); var _index = _interopRequireDefault(require("./index")); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } } var List = _styledComponents.default.div.withConfig({ displayName: "IllustrationList__List", componentId: "sc-1tc3qxp-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: "IllustrationList__Container", componentId: "sc-1tc3qxp-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: "IllustrationList__IllustrationJSX", componentId: "sc-1tc3qxp-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 IllustrationList = function IllustrationList() { return React.createElement(List, null, _consts.NAMES.map(function (illustration) { return React.createElement(Container, { key: illustration }, React.createElement(_index.default, { name: illustration }), React.createElement(IllustrationJSX, null, "<Illustration name=\"".concat(illustration, "\" />"))); })); }; var _default = IllustrationList; exports.default = _default;