UNPKG

react-auto-image-slider

Version:
25 lines (24 loc) 832 B
import { v4 as uuidv4 } from "uuid"; var generateKeys = function (count) { if (count === void 0) { count = 1; } var result = []; for (var i = 1; i <= count; i++) { result.push(uuidv4()); } return result; }; var styles = { setTranslateEffect: function (target, position, delay) { target.style.transition = "all ".concat(delay, "ms ease"); target.style.transform = "translateX(".concat(position, ")"); }, setEndTransitionEffect: function (target, delay) { target.style.opacity = "0"; target.style.transition = "opacity ".concat(delay, "ms ease"); }, resetOpacityAndPosition: function (target, position) { target.style.transform = "translateX(".concat(position, ")"); target.style.opacity = "1"; }, }; export { generateKeys, styles };