@kubit-ui-web/react-components
Version:
Kubit React Components is a customizable, accessible library of React web components, designed to enhance your application's user experience
22 lines • 945 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.getOrderConfiguration = void 0;
const breakpoints_1 = require("../../../types/breakpoints/breakpoints");
const getOrderConfiguration = (tabInverse, orderInverse) => {
const breakpoints = [
breakpoints_1.DeviceBreakpointsType.MOBILE,
breakpoints_1.DeviceBreakpointsType.TABLET,
breakpoints_1.DeviceBreakpointsType.DESKTOP,
];
const configuration = {};
breakpoints.forEach(breakpoint => {
configuration[breakpoint] = {
flexReverse: tabInverse.includes(breakpoint),
reverse: (tabInverse.includes(breakpoint) && !orderInverse.includes(breakpoint)) ||
(orderInverse.includes(breakpoint) && !tabInverse.includes(breakpoint)),
};
});
return configuration;
};
exports.getOrderConfiguration = getOrderConfiguration;
//# sourceMappingURL=getOrderConfiguration.js.map