1234567891011121314151617181920212223242526272829303132 |
- "use strict";
- exports.__esModule = true;
- exports["default"] = void 0;
- var _pxto = _interopRequireDefault(require("../internalHelpers/_pxto"));
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
- /**
- * Convert pixel value to rems. The default base value is 16px, but can be changed by passing a
- * second argument to the function.
- * @function
- * @param {string|number} pxval
- * @param {string|number} [base='16px']
- * @example
- * // Styles as object usage
- * const styles = {
- * 'height': rem('16px')
- * }
- *
- * // styled-components usage
- * const div = styled.div`
- * height: ${rem('16px')}
- * `
- *
- * // CSS in JS Output
- *
- * element {
- * 'height': '1rem'
- * }
- */
- var rem = (0, _pxto["default"])('rem');
- var _default = exports["default"] = rem;
- module.exports = exports.default;
|