jobiqo-cl
Version:
[](https://circleci.com/gh/jobiqo/jobiqo-cl)
30 lines (27 loc) • 1.18 kB
JavaScript
import React__default from 'react';
import { Grid } from '../../../02-atoms/06-layout/04-grid/index.js';
import { Cell } from '../../../02-atoms/06-layout/04-grid/01-cell/index.js';
import { Intro, ItemsWrapper } from './styles.js';
/**
* @file index.tsx
*
* @fileoverview Renders multiple columns. Receives an array ReactNodes
* 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 MultiColumn = ({ introTitle, introText, items }) => {
return (React__default.createElement(React__default.Fragment, null,
React__default.createElement(Intro, null,
introTitle,
introText),
React__default.createElement(ItemsWrapper, null,
React__default.createElement(Grid, { columns: `repeat(auto-fit, minmax(200px, 1fr))` }, items &&
items.map((item, index) => {
return React__default.createElement(Cell, { key: index }, item);
})))));
};
export { MultiColumn };