-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add "col" property in theme #78
base: master
Are you sure you want to change the base?
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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