svelte-grid
svelte-grid copied to clipboard
Documentation incomplete on `cols` prop
Quick aside: cool library! Thanks for sharing it. :)
The Usage docs claim that the cols
prop should be a number representing the number of columns in the layout, but that doesn't seem to be the whole story. Many of the examples actually pass in a matrix, like in the Basic example:
const cols = [
[ 1200, 6 ],
];
It would be helpful (and complete) to include an explanation of this matrix variant, especially as it relates to the hard-coded numerical item
keys in those same examples, e.g.:
let items = [
{
6: gridHelp.item({
//↑ This seems somehow related to the `6` in
// the previous `[1200, 6]`, right?
yes cols
must be Array<Array<Number>>
you basically tell the grid to have 6 columns, when the width of the container is >= N (1200)
then please fix the docs, this is so confusing my guy