os2display-grid-generator

1.0.10 • Public • Published

Grid-generator

This is a grid generator for os2display.

createGrid

Input is columns and rows, from which it creates and returns a string for grid area templates css property.

createGrid(2, 2);

Return:

'a b'
'c d'

and

createGrid(3, 4);

Return:

'a b c d'
'e f g h'
'i j k l'

createGridArea

Input is an array defining which columns the grid area should span.

output is a string for the grid-area css property.

createGridArea(["a", "d"]);

Return:

"a / a / d / d"

Testing

With jest

yarn test

Linting

check-coding-standards
apply-coding-standards

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
1.0.100latest

Version History

VersionDownloads (Last 7 Days)Published
1.0.100
1.0.90
1.0.80
1.0.70
1.0.60
1.0.50
1.0.40
1.0.30
1.0.20
1.0.10
1.0.00

Package Sidebar

Install

npm i os2display-grid-generator

Weekly Downloads

0

Version

1.0.10

License

MIT

Unpacked Size

8.63 kB

Total Files

8

Last publish

Collaborators

  • itkdev