jobiqo-cl
Version:
[](https://circleci.com/gh/jobiqo/jobiqo-cl)
31 lines (28 loc) • 1.27 kB
JavaScript
import React__default from 'react';
import Grid from '../../../02-atoms/06-layout/04-grid/index.js';
import { Intro, IconColumn, IconWrapper } from './styles.js';
/**
* @file index.tsx
*
* @fileoverview Renders multiple columns with some icon and text. Receives an array of icons, text
* and displays them in a grid.
*/
/**
* Presents information to a user in a multicolumn way. Useful
* to show information side by side. Its responsive so no matter how many items
* are inside it will show as many as possible side by side.
*/
const MultiColumnIcon = ({ introTitle, introText, items }) => {
return (React__default.createElement("div", null,
React__default.createElement(Intro, null,
introTitle,
introText),
React__default.createElement(Grid, { gridTemplateColumns: `repeat(auto-fit, minmax(200px, 1fr))` }, items &&
items.map((item, index) => {
const { color = 'primary' } = item;
return (React__default.createElement(IconColumn, { key: index },
React__default.createElement(IconWrapper, { color: color, "data-testid": "icon-wrapper" }, item.icon),
item.text));
}))));
};
export { MultiColumnIcon };