How to use the reflexbox/styled-components.Box function in reflexbox

To help you get started, we’ve selected a few reflexbox examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github rebassjs / rebass / packages / layout / styled-components / index.js View on Github external
var Tiles = (0, _react.forwardRef)(function (_ref, ref) {
  var width = _ref.width,
      columns = _ref.columns,
      _ref$gap = _ref.gap,
      gap = _ref$gap === void 0 ? 3 : _ref$gap,
      props = _objectWithoutProperties(_ref, ["width", "columns", "gap"]);

  var gridTemplateColumns = !!width ? widthToColumns(width) : countToColumns(columns);
  return _react["default"].createElement(_styledComponents.Box, _extends({
    ref: ref,
    tx: "layout",
    variant: "tiles"
  }, props, {
    __css: {
      display: 'grid',
      gridGap: gap,
      gridTemplateColumns: gridTemplateColumns
    }
  }));
});
exports.Tiles = Tiles;

reflexbox

Responsive React grid system built with Styled System, with support for Emotion and Styled Components

MIT
Latest version published 5 years ago

Package Health Score

61 / 100
Full package analysis