react-native-styleman
Version:
Responsive styling library for react native
18 lines (14 loc) • 528 B
JavaScript
;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.getMRem = void 0;
var _reactNative = require("react-native");
// Styling Utils
var getMRem = function getMRem(SCREEN_WIDTH_DP, DESIGN_GUIDELINES_BASE_WIDTH_DP, MODERATE_SCALING_FACTOR) {
var mulFactor = SCREEN_WIDTH_DP / DESIGN_GUIDELINES_BASE_WIDTH_DP;
return function (value) {
return _reactNative.PixelRatio.roundToNearestPixel(value + (mulFactor * value - value) * MODERATE_SCALING_FACTOR);
};
};
exports.getMRem = getMRem;