@ozen-ui/kit
Version:
React component library
10 lines (9 loc) • 436 B
JavaScript
export var shouldShowDots = function (_a) {
var leftSiblingStartIndex = _a.leftSiblingStartIndex, rightSiblingEndIndex = _a.rightSiblingEndIndex, totalPageCount = _a.totalPageCount;
var shouldShowLeftDots = leftSiblingStartIndex > 3;
var shouldShowRightDots = rightSiblingEndIndex < totalPageCount - 2;
return {
shouldShowLeftDots: shouldShowLeftDots,
shouldShowRightDots: shouldShowRightDots,
};
};