Decisiv / styled-components-modifiers

A library to enable BEM flavored modifiers (and responsive modifiers) in styled components.
MIT License
297 stars 11 forks source link

Enhance proptypes validation for responsive modifiers #27

Closed andrewtpoe closed 4 years ago

andrewtpoe commented 5 years ago

PROPOSED BEHAVIOR

If a modifier prop is used that is responsive (it is an object) but no size prop is provided, the proptypes validators should throw an error advising the developer to add the size prop. This is different than if the size prop doesn't match a key (which maybe shouldn't throw an error).

CURRENT BEHAVIOR

Currently this throws no errors, and when a developer encounters this they just get no modifiers applied.

STEPS TO REPRODUCE

Please provide some simple steps to reproduce the issue.

SUGGESTED SOLUTION

andrewtpoe commented 4 years ago

closed by #39