@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.
49 lines (48 loc) • 3.04 kB
JavaScript
;
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
exports.__esModule = true;
exports.default = void 0;
var _react = _interopRequireDefault(require("react"));
var _styledComponents = _interopRequireWildcard(require("styled-components"));
var _defaultTheme = _interopRequireDefault(require("../../defaultTheme"));
var _mediaQuery = _interopRequireDefault(require("../../utils/mediaQuery"));
var _ = _interopRequireDefault(require("."));
const List = _styledComponents.default.div.withConfig({
displayName: "IllustrationPrimitiveList__List",
componentId: "sc-bb6khm-0"
})(["display:flex;flex-flow:row wrap;justify-content:space-between;border-radius:", ";"], ({
theme
}) => theme.orbit.borderRadiusLarge);
List.defaultProps = {
theme: _defaultTheme.default
};
const Container = _styledComponents.default.div.withConfig({
displayName: "IllustrationPrimitiveList__Container",
componentId: "sc-bb6khm-1"
})(["", ""], ({
theme
}) => (0, _styledComponents.css)(["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:", ";", ";"], theme.orbit.spaceLarge, theme.orbit.borderRadiusLarge, theme.orbit.borderWidthCard, theme.orbit.borderStyleCard, theme.orbit.paletteCloudNormal, theme.orbit.spaceLarge, _mediaQuery.default.largeMobile((0, _styledComponents.css)(["flex-direction:row;"]))));
Container.defaultProps = {
theme: _defaultTheme.default
};
const IllustrationJSX = _styledComponents.default.div.withConfig({
displayName: "IllustrationPrimitiveList__IllustrationJSX",
componentId: "sc-bb6khm-2"
})(["", ""], ({
theme
}) => (0, _styledComponents.css)(["font-family:\"SFMono-Regular\",Consolas,\"Liberation Mono\",Menlo,Courier,monospace;font-size:12px;line-height:", ";color:", ";background-color:", ";border:", " ", " ", ";margin-top:", ";padding:", " ", ";", ";"], theme.orbit.lineHeightTextSmall, theme.orbit.paletteInkNormal, theme.orbit.paletteCloudLight, theme.orbit.borderWidthCard, theme.orbit.borderStyleCard, theme.orbit.paletteCloudNormal, theme.orbit.spaceMedium, theme.orbit.spaceXXSmall, theme.orbit.spaceXSmall, _mediaQuery.default.largeMobile((0, _styledComponents.css)(["margin:0;"]))));
IllustrationJSX.defaultProps = {
theme: _defaultTheme.default
};
const IllustrationPrimitiveList = props => {
return /*#__PURE__*/_react.default.createElement(List, null, props.images.map(illustration => {
return /*#__PURE__*/_react.default.createElement(Container, {
key: illustration
}, /*#__PURE__*/_react.default.createElement(_.default, {
name: illustration
}), /*#__PURE__*/_react.default.createElement(IllustrationJSX, null, `<${props.nameOfComponent} name="${illustration}" />`));
}));
};
var _default = IllustrationPrimitiveList;
exports.default = _default;