This is a grid generator for os2display.
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'
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"
With jest
yarn test
check-coding-standards
apply-coding-standards