2.1.3 • Published 6 years ago

@comparaonline/ui-grid v2.1.3

Weekly downloads
8
License
ISC
Repository
github
Last release
6 years ago

@comparaonline/ui-grid

code style: prettier npm version

  • Row and Column components based on react-foundation project
  • Breakpoints json file included has screen breakpoints sizes

Installation

$ npm install --save @comparaonline/ui-grid

Usage

This package relies on the existence of the stylesheet located at dist/index.css, please import it accordly to your project needs.

Row

import { Row } from '@comparaonline/ui-grid';

The known props for Row are:

namedescriptiondefault value
collapseRemoves the columns gutterfalse
expandedSets width to 100%false
collapseOnbreakpointRemoves the gutters on the given breakpointundefined
uncollapseOnbreakpointOverrides collapseOn rules inherited from smaller sizesundefined
equalHeightColumnsSets all the columns height to the max column height (requires flex support)false
addVerticalGuttersAdds vertical gutters to all the children columnsfalse

Column

import { Column } from '@comparaonline/ui-grid';

The known props for Column are:

namedescriptiondefault value
small, medium, large, xlarge, xxlargeSets the column size per breakpointsmall=12
offsetOnbreakpointMoves block to right according to offset,undefined
pushOnbreakpointRight shift columnundefined
pullOnbreakpointLeft shift columnundefined
centeredOnbreakpointCenters the column on the given breakpointundefined
uncenteredOnbreakpointOverrides centeredOn rules inherited from smaller sizesundefined

Example:

<Row>
  <Column small={2} large={4} pushOnSmall={2} pullOnLarge={2}>
    Content
  </Column>
  <Column small={2} offsetOnLarge={4} centeredOnSmall uncenteredOnLarge>
    Content
  </Column>
</Row>

Visibility props

namedescriptiondefault value
showOnbreakpointShows itself from the given breakpoint an higherundefined
hideOnbreakpointHides itself from the given breakpoint an higherundefined

Breakpoints

The breakpoints values are exported as a literal object with the following properties:

namesize
xsmall0px
small480px
medium600px
large840px
xlarge960px
xxlarge1280px

To access to this values, simply import them:

import { breakpoints } from '@comparaonline/ui-grid';

Other settings

Other relevant values are exposed using the settings object.

import { settings } from '@comparaonline/ui-grid';

The current output is:

{
  gutters: {
    default: "16px"
  }
}
2.1.3

6 years ago

2.1.2

6 years ago

2.1.1

6 years ago

2.1.0

6 years ago

2.0.1

6 years ago

2.1.0-0

6 years ago

2.0.0

6 years ago

1.3.5

6 years ago

1.3.4

6 years ago

1.3.3

6 years ago

1.3.2

7 years ago

1.3.0

7 years ago

1.2.0

7 years ago

1.0.4

7 years ago

1.0.3

7 years ago

1.0.2

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago