UNPKG

jobiqo-cl

Version:

[![CircleCI](https://circleci.com/gh/jobiqo/jobiqo-cl.svg?style=svg&circle-token=5a24efa5b8bbc4879276123e77d0d3f35ca7144c)](https://circleci.com/gh/jobiqo/jobiqo-cl)

38 lines (32 loc) 1.31 kB
'use strict'; Object.defineProperty(exports, '__esModule', { value: true }); function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; } var React = require('react'); var React__default = _interopDefault(React); var styled = require('styled-components'); var styled__default = _interopDefault(styled); /** * @file index.tsx * * @fileoverview Aligns content to the center. */ /** * Will align content provide in the children property centerally. * Use this component when you want to align something centerally. */ const StyledFlex = styled__default.div ` display: flex; align-items: ${props => props.alignItems}; justify-content: ${props => props.justifyContent}; flex-direction: ${props => props.flow}; flex-wrap: ${props => props.flexWrap}; `; /** * Display multiple items in a flex structure. Useful for laying single dimensionally * a set of items together. */ const FlexItems = ({ flow = 'row', alignItems = 'flex-start', justifyContent = 'flex-start', flexWrap = 'wrap', children }) => { return (React__default.createElement(StyledFlex, { flow: flow, alignItems: alignItems, justifyContent: justifyContent, flexWrap: flexWrap }, children)); }; exports.FlexItems = FlexItems; exports.default = FlexItems;