@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.
42 lines • 2.39 kB
JavaScript
import React from "react";
import styled, { css } from "styled-components";
import defaultTheme from "../../defaultTheme";
import mq from "../../utils/mediaQuery";
import IllustrationPrimitive from ".";
const List = styled.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
};
const Container = styled.div.withConfig({
displayName: "IllustrationPrimitiveList__Container",
componentId: "sc-bb6khm-1"
})(["", ""], ({
theme
}) => 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, mq.largeMobile(css(["flex-direction:row;"]))));
Container.defaultProps = {
theme: defaultTheme
};
const IllustrationJSX = styled.div.withConfig({
displayName: "IllustrationPrimitiveList__IllustrationJSX",
componentId: "sc-bb6khm-2"
})(["", ""], ({
theme
}) => 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, mq.largeMobile(css(["margin:0;"]))));
IllustrationJSX.defaultProps = {
theme: defaultTheme
};
const IllustrationPrimitiveList = props => {
return /*#__PURE__*/React.createElement(List, null, props.images.map(illustration => {
return /*#__PURE__*/React.createElement(Container, {
key: illustration
}, /*#__PURE__*/React.createElement(IllustrationPrimitive, {
name: illustration
}), /*#__PURE__*/React.createElement(IllustrationJSX, null, `<${props.nameOfComponent} name="${illustration}" />`));
}));
};
export default IllustrationPrimitiveList;