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.
Create a component with modifiers.
Render the component in an application using an object syntax to declare the modifiers.
Do not provide a size prop
Observe no errors and no styles applied.
SUGGESTED SOLUTION
This could (and probably should) be done as an enhancement to the proptypes logic. Basically a size prop is required if the modifiers prop is a responsive format.
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.
size
propSUGGESTED SOLUTION
size
prop is required if the modifiers prop is a responsive format.