This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Converts pixel size to rem and accepts the base as second argument. default base is 16px | |
* | |
* @param {number|string} px | |
* @param {number} base | |
* @return {string} | |
*/ | |
const remCalc = (px: number | string, base: number = 16) => { | |
const tempPx = `${px}`.replace('px', '') |