-
Notifications
You must be signed in to change notification settings - Fork 12
Accept "sizePassthrough" prop #81
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
base: master
Are you sure you want to change the base?
Conversation
Added updates to eslint configuration because it was failing for me with the given version. Fixed the eslint errors that it gave me throughout. All looks good now. |
Codecov Report
@@ Coverage Diff @@
## master #81 +/- ##
=========================================
- Coverage 98.38% 95.58% -2.8%
=========================================
Files 5 5
Lines 62 68 +6
Branches 16 18 +2
=========================================
+ Hits 61 65 +4
- Misses 0 2 +2
Partials 1 1
Continue to review full report at Codecov.
|
Ok - first pull request here so sorry if I did not follow any special rules to it :-).
Anyway, this just allows defining
sizePassthrough
with a boolean or a string. boolean will pass{ size: { height, width }
whereas string will pass{ [this.props.sizePassthrough]: { height, width } }
You may have a better way you would want to handle this (if accepted) with the merge components. I simply name the sizePassthrough the string that it should add to the props and if the value is defined it sends it through.