react-dates
Version:
A responsive and accessible date range picker component built with React
15 lines (13 loc) • 671 B
JavaScript
;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports["default"] = noflip;
var NOFLIP = '/* @noflip */'; // Appends a noflip comment to a style rule in order to prevent it from being automatically
// flipped in RTL contexts. This should be used only in situations where the style must remain
// unflipped regardless of direction context. See: https://github.com/kentcdodds/rtl-css-js#usage
function noflip(value) {
if (typeof value === 'number') return "".concat(value, "px ").concat(NOFLIP);
if (typeof value === 'string') return "".concat(value, " ").concat(NOFLIP);
throw new TypeError('noflip expects a string or a number');
}