react-native-web-internals
Version:
React Native for Web
27 lines (26 loc) • 944 B
JavaScript
import normalizeColor from "./normalizeColor.mjs";
import normalizeValueWithProperty from "./normalizeValueWithProperty.mjs";
const defaultOffset = {
height: 0,
width: 0
},
resolveShadowValue = style => {
const {
shadowColor,
shadowOffset,
shadowOpacity,
shadowRadius
} = style,
{
height,
width
} = shadowOffset || defaultOffset,
offsetX = normalizeValueWithProperty(width),
offsetY = normalizeValueWithProperty(height),
blurRadius = normalizeValueWithProperty(shadowRadius || 0),
color = normalizeColor(shadowColor || "black", shadowOpacity);
if (color != null && offsetX != null && offsetY != null && blurRadius != null) return `${offsetX} ${offsetY} ${blurRadius} ${color}`;
};
var resolveShadowValue_default = resolveShadowValue;
export { resolveShadowValue_default as default };
//# sourceMappingURL=resolveShadowValue.mjs.map