UNPKG

@kiwicom/orbit-components

Version:

Orbit-components is a React component library which provides developers with the easiest possible way of building Kiwi.com’s products.

19 lines (15 loc) 488 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; /* If gap is not defined or cellIndex is 1 just return cellIndex. If not, we need to add all previous gaps (cellIndex - 1). This is necessary because IE10+ takes gap as separate column. */ var applyGap = function applyGap(cellIndex, isGap) { return cellIndex > 1 && isGap ? cellIndex + (cellIndex - 1) : cellIndex; }; var _default = applyGap; exports.default = _default;