@chayns-components/swipeable-wrapper
Version:
A set of beautiful React components for developing your own applications with chayns.
10 lines • 350 B
JavaScript
import { SWIPEABLE_ACTION_WIDTH } from '../components/swipeable-wrapper/swipeable-action/SwipeableAction';
export const calcThreshold = _ref => {
let {
actionCount,
direction,
width
} = _ref;
return Math.max(width / 2, SWIPEABLE_ACTION_WIDTH * actionCount) * (direction === 'left' ? 1 : -1);
};
//# sourceMappingURL=threshold.js.map