Closed andrewtpoe closed 4 years ago
When using a modifier using applyStyleModifier in a responsive component, the default modifier should be applied if size is provided but does not match.
applyStyleModifier
size
This simple example should apply the default modifier value (modifier1):
modifier1
<Component modifiers={{_: 'modifier1', LG: 'modifier2'}} size="SM" />
Given the scenario above, no modifiers will be applied.
The logic behind selecting responsive modifiers needs to be improved to handle this scenario. This same logic is repeated in a few other locations as well.
closed by #49
EXPECTED BEHAVIOR
When using a modifier using
applyStyleModifier
in a responsive component, the default modifier should be applied ifsize
is provided but does not match.This simple example should apply the default modifier value (
modifier1
):ACTUAL BEHAVIOR
Given the scenario above, no modifiers will be applied.
STEPS TO REPRODUCE
SUGGESTED SOLUTION
The logic behind selecting responsive modifiers needs to be improved to handle this scenario. This same logic is repeated in a few other locations as well.