UNPKG

react-multi-carousel

Version:

Lightweight fully customizable React carousel component supports multiple items and SSR(Server-side rendering) with typescript.

21 lines 810 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); function guessWidthFromDeviceType(deviceType, responsive) { let itemWidth; if (responsive[deviceType]) { const { items } = responsive[deviceType]; itemWidth = (100 / items).toFixed(1); } return itemWidth; } exports.guessWidthFromDeviceType = guessWidthFromDeviceType; function getParitialVisibilityGutter(responsive, partialVisbile, serverSideDeviceType, clientSideDeviceType) { let gutter = 0; const deviceType = clientSideDeviceType || serverSideDeviceType; if (partialVisbile && deviceType) { gutter = responsive[deviceType].paritialVisibilityGutter; } return gutter; } exports.getParitialVisibilityGutter = getParitialVisibilityGutter; //# sourceMappingURL=utils.js.map