@flodesk/grain 11.0.2 → 11.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -24,7 +24,7 @@ export var generateStyleAttributes = function generateStyleAttributes(props) {
|
|
|
24
24
|
propsSet.props.forEach(function (_ref) {
|
|
25
25
|
var propName = _ref.propName;
|
|
26
26
|
var value = props[propName];
|
|
27
|
-
if (
|
|
27
|
+
if (value === undefined || value === null) return;
|
|
28
28
|
var hasVariable = variableChecker && variableChecker(value);
|
|
29
29
|
if (hasVariable) return;
|
|
30
30
|
|
|
@@ -42,9 +42,10 @@ export var generateStyleAttributes = function generateStyleAttributes(props) {
|
|
|
42
42
|
tablet = value.tablet; // accept fixed string media queries to help migration
|
|
43
43
|
|
|
44
44
|
var mobileMediaValue = value[mediaQueries.mobile];
|
|
45
|
-
var tabletMediaValue = value[mediaQueries.tablet];
|
|
46
|
-
|
|
47
|
-
var
|
|
45
|
+
var tabletMediaValue = value[mediaQueries.tablet]; // check undefined to allow 0 value
|
|
46
|
+
|
|
47
|
+
var mob = mobileMediaValue !== undefined ? mobileMediaValue : mobile;
|
|
48
|
+
var tab = tabletMediaValue !== undefined ? tabletMediaValue : tablet;
|
|
48
49
|
styles["--".concat(propNameShort, "-").concat(deviceShort.default)] = processValue(def);
|
|
49
50
|
styles["--".concat(propNameShort, "-").concat(deviceShort.mobile)] = processValue(mob);
|
|
50
51
|
styles["--".concat(propNameShort, "-").concat(deviceShort.tablet)] = processValue(tab);
|