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.

69 lines (67 loc) 2.46 kB
import * as React from "react"; import styled, { css } from "styled-components"; import { NAMES } from "./consts"; import defaultTheme from "../defaultTheme"; import mq from "../utils/mediaQuery"; import Illustration from "./index"; const List = styled.div.withConfig({ displayName: "IllustrationList__List", componentId: "sc-1tc3qxp-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: "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:", ";", ";"], ({ theme }) => theme.orbit.spaceLarge, ({ theme }) => theme.orbit.borderRadiusLarge, ({ theme }) => theme.orbit.borderWidthCard, ({ theme }) => theme.orbit.borderStyleCard, ({ theme }) => theme.orbit.paletteCloudNormal, ({ theme }) => theme.orbit.spaceLarge, mq.largeMobile(css(["flex-direction:row;"]))); Container.defaultProps = { theme: defaultTheme }; const IllustrationJSX = styled.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:", " ", ";", ";"], ({ 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, mq.largeMobile(css(["margin:0;"]))); IllustrationJSX.defaultProps = { theme: defaultTheme }; const IllustrationList = () => React.createElement(List, null, NAMES.map(illustration => { return React.createElement(Container, { key: illustration }, React.createElement(Illustration, { name: illustration }), React.createElement(IllustrationJSX, null, `<Illustration name="${illustration}" />`)); })); export default IllustrationList;