react-component-queries icon indicating copy to clipboard operation
react-component-queries copied to clipboard

Accept "sizePassthrough" prop

Open bradennapier opened this issue 8 years ago • 2 comments

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.

bradennapier avatar May 02 '17 23:05 bradennapier

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.

bradennapier avatar May 03 '17 00:05 bradennapier

Codecov Report

Merging #81 into master will decrease coverage by 2.79%. The diff coverage is 66.66%.

Impacted file tree graph

@@            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
Impacted Files Coverage Δ
src/componentQueries.js 95.83% <66.66%> (-4.17%) :arrow_down:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 5279a50...23710ce. Read the comment docs.

codecov[bot] avatar Sep 26 '17 05:09 codecov[bot]