React Grid Layout automatic detection
Hi. I'm working with React Grid Layout in a responsive way where I need to compute the correct layout based on some "type" of widget. Here is an example.
Input:
Output:
1 Reply
The is to calculate the height and the width based on the type. For example: simple-value uses 1 row and 1 column on xs. On sm uses 1 row and 2 columns. And on large viewports it uses 1/3 of the total columns and 1 row. Tables use 100% of the columns but on larger viewports, uses 2/3 of the columns. Finally, lists use 100% of the columns but on larger, use 1/3 and always 2 rows.
Before coding the logic, I prefer to ask if there is an exists function to archive this
Some like this maybe: