fix extendGrid breakpoint issue
Hi
I've experienced a couple of issues when using extendGrid and thought I'd try fixing them
Issue 1: Passing in a number or string value when extending the grid causes the grid.breakpoint value to always be equal to the extended value e.g
const grid = useGrid(extendGrid('tailwind', {
xs: 500,
})
grid is now equal to the object below no matter what the screen size is
{ breakpoint: 'xs', xs: true, sm: true, md: true, lg: false, xl: false, 2xl: false }
Issue 2: Passing in a ComputedBreakpoint function causes the grid.breakpoint to be an empty string when the conditions are met. I'd expect the value of grid.breakpoint to be equal to the extended property
const grid = useGrid(extendGrid('tailwind', {
xs: (grid) => !grid.lg,
})
Hey, let me know if there's anything you'd like me to change or fix
Hello @raducostica , sorry for responding almost after a year but life took over 😓 . I have published version 2.2.0 with a fix for your problem, if you are still willing to check, please test against the latest version.