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