feat: add "col" property in theme#78
Conversation
Codecov Report
@@ Coverage Diff @@
## master #78 +/- ##
=====================================
Coverage 100% 100%
=====================================
Files 11 11
Lines 90 93 +3
Branches 23 24 +1
=====================================
+ Hits 90 93 +3
Continue to review full report at Codecov.
|
| const value = has(props, `${breakpoint}`) | ||
| ? props[breakpoint] | ||
| : theme(props).col[breakpoint]; | ||
| return (Math.abs(value) / theme(props).columns) * 100; |
There was a problem hiding this comment.
If you return undefined as a value, does this line work fine or does it throw an error?
There was a problem hiding this comment.
It doesn't throw an error but you are right, there is no reason to have code smell. Just committed a fix a306b72
There was a problem hiding this comment.
Thanks @sstefoss! Will do a final test through and merge soon! :)
|
Nice PR, thanks for spending the time to complete this! I will pull this down and test locally. Will merge ASAP! :) |
|
@sstefoss Apologies for the delay. I had been some testing and noticed some issues when running this via the storybook document. I will need to do some investigation to see what is going wrong (odd column stacking and height). In addition We should also add documentation on this feature within both the |
|
The issue with the height looks to be an issue more with an older cached version of storybook rather than your changes. I will investigate further. |
Added "col" property in theme in order to set the default breakpoint value of a Column.
Closes #72