UNPKG

react-native-web-internals

Version:

React Native for Web

13 lines (12 loc) 835 B
import normalizeColor from "./normalizeColor"; import normalizeValueWithProperty from "./normalizeValueWithProperty"; 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.js.map