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