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)

41 lines (31 loc) 1.09 kB
'use strict'; Object.defineProperty(exports, '__esModule', { value: true }); function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; } var styled = require('styled-components'); var styled__default = _interopDefault(styled); /** * Renders a grid cell inside a container of display "grid". * * This component was taken / inspired by https://styled-css-grid.js.org/ */ /** * A CSS Grid individual cell. */ const Cell = styled__default.div ` height: 100%; min-width: 0; grid-column-end: ${({ width = 1 }) => `span ${width}`}; grid-row-end: ${({ height = 1 }) => `span ${height}`}; ${({ left }) => left && `grid-column-start: ${left}`}; ${({ top }) => top && `grid-row-start: ${top}`}; ${({ center }) => center && `text-align: center`}; ${({ area }) => area && `grid-area: ${area}`}; ${ /* prettier-ignore */({ middle }) => middle && ` display: inline-flex; flex-flow: column wrap; justify-content: center; justify-self: stretch; `}; `; exports.Cell = Cell; exports.default = Cell;