UNPKG

@chayns-components/swipeable-wrapper

Version:

A set of beautiful React components for developing your own applications with chayns.

14 lines (13 loc) 465 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.calcThreshold = void 0; var _SwipeableAction = require("../components/swipeable-wrapper/swipeable-action/SwipeableAction"); const calcThreshold = ({ actionCount, direction, width }) => Math.max(width / 2, _SwipeableAction.SWIPEABLE_ACTION_WIDTH * actionCount) * (direction === 'left' ? 1 : -1); exports.calcThreshold = calcThreshold; //# sourceMappingURL=threshold.js.map