react-sc-grid

1.0.8 • Public • Published

React Styled Components Grid

A simple React grid component built with Styled Components, adapted from Udemy course 'Advanced CSS and Sass: Flexbox, Grid, Animations and More!'.

View example here: https://react-sc-grid-storybook.s3-eu-west-1.amazonaws.com/storybookS3/index.html?path=/story/example-usage--grid

Installation

npm i react-sc-grid

Usage

Exports are Column and Row and the default gutter width is 8px.

import { Column, Row } from 'react-sc-grid';
 
const App = () => {
  <>
    <Row>
      <Column width={1} numCols={2}>
        col 1 of 2
      </Column>
      <Column width={1} numCols={2}>
        col 1 of 2
      </Column>
    </Row>
    <Row>
      <Column width={1} numCols={3}>
        col 1 of 3
      </Column>
      <Column width={2} numCols={3}>
        col 2 of 3
      </Column>
    </Row>
  </>;
};

Readme

Keywords

none

Package Sidebar

Install

npm i react-sc-grid

Weekly Downloads

1

Version

1.0.8

License

ISC

Unpacked Size

30.8 MB

Total Files

30

Last publish

Collaborators

  • robynb