🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more

react-xy-grid

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install
Package was removed
Sorry, it seems this package was removed from the registry

react-xy-grid

react-xy-grid React component

1.0.0
unpublished
latest
Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created

react-xy-grid

React component that wraps Foundation's XY Grid.

code style: prettier Commitizen friendly npm version

Table of Contents

Installation

Begin by installing the package as a dependency.

npm i -S react-xy-grid

Start utilizing the components where needed.

import * as React from "react";
import { Cell, Grid, GridContainer } from "react-xy-grid";

const Home = () => {
  return (
    <GridContainer>
      <Grid gridX valign="middle">
        <Cell sm={12} lg={6}>
          <span>Lorem ipsum dolor sit, amet consectetur adipisicing elit.</span>
        </Cell>
        <Cell sm={12} lg={6}>
          <a href="/explicabo">Explicabo!</a>
        </Cell>
      </Grid>
    </GridContainer>
  );
};

export default Home;

Cell

NameTypeRequiredDefault Value
autobooleanfalsefalse
childrenReactNodetrueundefined
classNamestringfalseundefined
componentstringfalse"div"
lg"auto", "shrink", 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, or 12falseundefined
lgOffset1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, or 12falseundefined
md"auto", "shrink", 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, or 12falseundefined
mdOffset1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, or 12falseundefined
shrinkbooleanfalsefalse
sm"auto", "shrink", 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, or 12falseundefined
smOffset1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, or 12falseundefined
valign"bottom", "middle", "stretch", or "top"falseundefined

Grid

NameTypeRequiredDefault Value
align"center", "justify", "right", or "spaced"falseundefined
childrenReactNodetrueundefined
classNamestringfalseundefined
componentstringfalse"div"
gridXbooleanfalsefalse
gridYbooleanfalsefalse
heightnumber or stringfalseundefined
lgCollapse"margin" or "padding"falseundefined
lgUp1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, or 12falseundefined
marginXbooleanfalsefalse
marginYbooleanfalsefalse
mdCollapse"margin" or "padding"falseundefined
mdUp1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, or 12falseundefined
paddingXbooleanfalsefalse
paddingYbooleanfalsefalse
smCollapse"margin" or "padding"falseundefined
smUp1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, or 12falseundefined
valign"bottom", "middle", "stretch", or "top"falseundefined

Grid Container

NameTypeRequiredDefault Value
childrenReactNodetrueundefined
classNamestringfalseundefined
componentstringfalse"div"
fluidbooleanfalsefalse
fullbooleanfalsefalse

Notes

If you import the components for use via the module namespace like so:

import { Cell, Grid, GridContainer } from "react-xy-grid";

Using this syntax, you will not have to manually import the CSS file as the module's index file import's a compiled CSS version of the Foundation styles.

This assumes that your build system is configured to handle importing .css files in your scripts.

However, there is a .scss in the module's directory that can be used to generate the Foundation styles at compile time. If this is the desired result, you will need to adjust the above import statement, to avoid importing the .css file.

import Cell from "react-xy-grid/Cell/Cell";
import Grid from "react-xy-grid/Grid/Grid";
import GridContainer from "react-xy-grid/GridContainer/GridContainer";

This may be valuable if your build system is not configured to handle importing .css files in your scripts.

Additionally, you will have to import the module's .scss file.

@import "~react-xy-grid/index.scss";

// or

@import "../../node_modules/react-xy-grid/index.scss";

The first import example assumes your sass compiler supports the ~ syntax to import from node_modules

FAQs

Package last updated on 06 Jun 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts