react-dates
Version:
A responsive and accessible date range picker component built with React
9 lines (8 loc) • 577 B
JavaScript
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
export default 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');
}