react-native-web-internals
Version:
React Native for Web
21 lines (20 loc) • 770 B
JavaScript
import { unitlessNumbers } from "../../modules/unitlessNumbers/index.mjs";
import normalizeColor from "./normalizeColor.mjs";
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.mjs.map