@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.
32 lines (30 loc) • 2.16 kB
JavaScript
import * as React from "react";
import styled from "styled-components";
import { defaultTokens } from "@kiwicom/orbit-design-tokens";
import * as Icons from "../icons";
const List = styled.div.withConfig({
displayName: "IconList__List",
componentId: "sc-1v6369a-0"
})(["display:flex;flex-flow:row wrap;justify-content:space-between;border-radius:", ";"], defaultTokens.borderRadiusLarge);
const Container = styled.div.withConfig({
displayName: "IconList__Container",
componentId: "sc-1v6369a-1"
})(["display:flex;flex-direction:row;justify-content:flex-start;align-items:center;align-content:center;width:100%;min-height:80px;background-color:white;margin-bottom:", ";border-radius:", ";border:", " ", " ", ";padding-right:", ";"], defaultTokens.spaceLarge, defaultTokens.borderRadiusLarge, defaultTokens.borderWidthCard, defaultTokens.borderStyleCard, defaultTokens.paletteCloudNormal, defaultTokens.spaceLarge);
const IconImport = styled.div.withConfig({
displayName: "IconList__IconImport",
componentId: "sc-1v6369a-2"
})(["font-family:\"SFMono-Regular\",Consolas,\"Liberation Mono\",Menlo,Courier,monospace;font-size:12px;line-height:", ";color:", ";background-color:", ";border:", " ", " ", ";padding:", " ", ";"], defaultTokens.lineHeightTextSmall, defaultTokens.paletteInkNormal, defaultTokens.paletteCloudLight, defaultTokens.borderWidthCard, defaultTokens.borderStyleCard, defaultTokens.paletteCloudNormal, defaultTokens.spaceXXSmall, defaultTokens.spaceXSmall);
const IconList = () => /*#__PURE__*/React.createElement(List, null, Object.keys(Icons).filter(n => n !== "__namedExportsOrder").map(icon => {
const Icon = styled(Icons[icon]).withConfig({
displayName: "IconList__Icon",
componentId: "sc-1v6369a-3"
})(["padding:0 ", ";flex-shrink:0;"], defaultTokens.spaceLarge);
const iconName = `${icon}`;
return /*#__PURE__*/React.createElement(Container, {
key: icon
}, /*#__PURE__*/React.createElement(Icon, {
size: "large",
color: "primary"
}), /*#__PURE__*/React.createElement(IconImport, null, `import ${iconName} from "@kiwicom/orbit-components/lib/icons/${iconName}"`));
}));
export default IconList;