react-magic-card 1.1.1 → 1.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -269,9 +269,6 @@ const MagicCircle = ({ images, start, height, width, dynamic = true, scrollDirec
|
|
|
269
269
|
};
|
|
270
270
|
// has after Lazy loading fade transition.
|
|
271
271
|
const [isLoaded, setIsLoaded] = (0, react_1.useState)(false);
|
|
272
|
-
(0, react_1.useEffect)(() => {
|
|
273
|
-
setIsLoaded(true);
|
|
274
|
-
}, []);
|
|
275
272
|
return (react_1.default.createElement(framer_motion_1.LazyMotion, { features: framer_motion_1.domAnimation },
|
|
276
273
|
react_1.default.createElement("div", { className: className },
|
|
277
274
|
react_1.default.createElement(framer_motion_1.m.div, { className: styles_module_css_1.default.outer, ref: refOuter, tabIndex: offsetIndex <= 0 ? 0 : offsetIndex - 1, onKeyDown: handleKeyPress, style: {
|
|
@@ -289,7 +286,7 @@ const MagicCircle = ({ images, start, height, width, dynamic = true, scrollDirec
|
|
|
289
286
|
(hasSelect && classImageSelect) +
|
|
290
287
|
' ' +
|
|
291
288
|
classImageUnique +
|
|
292
|
-
zIndex, role: 'button', src: image.src, alt: image.alt, draggable: false, loading: loading, animate: {
|
|
289
|
+
zIndex, role: 'button', src: image.src, alt: image.alt, draggable: false, loading: loading, onLoad: () => setIsLoaded(true), animate: {
|
|
293
290
|
rotate: -count,
|
|
294
291
|
scale: hasSelect ? animate === null || animate === void 0 ? void 0 : animate.selectScale : animate === null || animate === void 0 ? void 0 : animate.scale,
|
|
295
292
|
rotateY: hasSelect
|
|
@@ -216,9 +216,6 @@ const MagicStraight = ({ images, start, height, width, vertical = true, margin =
|
|
|
216
216
|
};
|
|
217
217
|
// has after Lazy loading fade transition.
|
|
218
218
|
const [isLoaded, setIsLoaded] = (0, react_1.useState)(false);
|
|
219
|
-
(0, react_1.useEffect)(() => {
|
|
220
|
-
setIsLoaded(true);
|
|
221
|
-
}, []);
|
|
222
219
|
return (react_1.default.createElement(framer_motion_1.LazyMotion, { features: framer_motion_1.domAnimation },
|
|
223
220
|
react_1.default.createElement("div", { className: className },
|
|
224
221
|
react_1.default.createElement("div", { className: styles_module_css_1.default.outer, ref: refOuter, tabIndex: offsetIndex <= 0 ? 0 : offsetIndex - 1, onKeyDown: handleKeyPress, style: {
|
|
@@ -240,7 +237,7 @@ const MagicStraight = ({ images, start, height, width, vertical = true, margin =
|
|
|
240
237
|
(hasSelect && classImageSelect) +
|
|
241
238
|
' ' +
|
|
242
239
|
classImageUnique +
|
|
243
|
-
index, src: image.src, alt: image.alt, role: 'button', draggable: false, loading: loading, animate: {
|
|
240
|
+
index, src: image.src, alt: image.alt, role: 'button', draggable: false, loading: loading, onLoad: () => setIsLoaded(true), animate: {
|
|
244
241
|
y: hasSelect
|
|
245
242
|
? vertical
|
|
246
243
|
? (average - index) * height +
|