react-native-web-internals
Version:
React Native for Web
23 lines (22 loc) • 763 B
JavaScript
import { unitlessNumbers } from "../../modules/unitlessNumbers/index";
import normalizeColor from "./normalizeColor";
const colorProps = {
backgroundColor: !0,
borderColor: !0,
borderTopColor: !0,
borderRightColor: !0,
borderBottomColor: !0,
borderLeftColor: !0,
color: !0,
shadowColor: !0,
textDecorationColor: !0,
textShadowColor: !0
};
function normalizeValueWithProperty(value, property) {
let returnValue = value;
return (property == null || !unitlessNumbers[property]) && typeof value == "number" ? returnValue = `${value}px` : property != null && colorProps[property] && (returnValue = normalizeColor(value)), returnValue;
}
export {
normalizeValueWithProperty as default
};
//# sourceMappingURL=normalizeValueWithProperty.js.map