react-magic-card 0.1.14 → 0.1.16

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.
package/README.md CHANGED
@@ -99,7 +99,7 @@ function MyComponent() {
99
99
  | selectOffsetX | X-axis position |
100
100
  | selectOffsetY | Y-axis position |
101
101
 
102
- ## Animation Properties
102
+ ## Animation Object
103
103
 
104
104
  | Property | Meaning |
105
105
  | ------------- | ------------------------------------- |
@@ -114,15 +114,15 @@ function MyComponent() {
114
114
  | selectRotateY | Y-axis rotation of the selected image |
115
115
  | selectRotateZ | Z-axis rotation of the selected image |
116
116
 
117
- ## Transition Properties
117
+ ## Transition Object
118
118
 
119
- It is Inherits framer motion transition properties other than intera.
119
+ It is Inherits framer motion transition object other than intera.
120
120
 
121
- ## Pick Properties
121
+ ## Pick Object
122
122
 
123
123
  | Property | Meaning |
124
124
  | --------- | --------------------------------------------------------- |
125
- | classPick | class name of the pick image |
125
+ | classPick | className of the pick image |
126
126
  | white | white or black for background the default true |
127
127
  | alpha | background transparency of a number between 0 ~ 1 |
128
128
  | blur | blur intensity of a number between 1 ~ 20 a preferred |
@@ -161,7 +161,7 @@ const MagicCircle = ({ images, height, width, dynamic = true, clockwise = true,
161
161
  e.key === 'Escape' && setHasPick(false);
162
162
  };
163
163
  return (react_1.default.createElement(framer_motion_1.LazyMotion, { features: framer_motion_1.domAnimation },
164
- react_1.default.createElement(framer_motion_1.m.div, { ref: div1Ref, tabIndex: offsetIndex < 0 ? 0 : offsetIndex - 1, onKeyDown: handleKeyPress, className: className + ' ' + styles_module_css_1.default.outer, style: {
164
+ react_1.default.createElement(framer_motion_1.m.div, { ref: div1Ref, tabIndex: offsetIndex <= 0 ? 0 : offsetIndex - 1, onKeyDown: handleKeyPress, className: className + ' ' + styles_module_css_1.default.outer, style: {
165
165
  zIndex: offsetIndex - 1,
166
166
  width: radius * 2 + controller + 'px',
167
167
  height: radius * 2 + controller + 'px'
@@ -174,7 +174,7 @@ const MagicStraight = ({ images, height, width, vertical = true, margin = 0, sel
174
174
  e.key === 'Escape' && setHasPick(false);
175
175
  };
176
176
  return (react_1.default.createElement(framer_motion_1.LazyMotion, { features: framer_motion_1.domAnimation },
177
- react_1.default.createElement("div", { ref: div1Ref, tabIndex: offsetIndex < 0 ? 0 : offsetIndex - 1, onKeyDown: handleKeyPress, className: className + ' ' + styles_module_css_1.default.outer, style: {
177
+ react_1.default.createElement("div", { ref: div1Ref, tabIndex: offsetIndex <= 0 ? 0 : offsetIndex - 1, onKeyDown: handleKeyPress, className: className + ' ' + styles_module_css_1.default.outer, style: {
178
178
  zIndex: offsetIndex - 1,
179
179
  width: !vertical ? height + controller + 'px' : 'fit-content',
180
180
  height: vertical ? width + controller + 'px' : 'fit-content',
@@ -187,7 +187,7 @@ const MagicStraight = ({ images, height, width, vertical = true, margin = 0, sel
187
187
  const zIndex = reverseIndex
188
188
  ? offsetIndex + images.length - 1 - index
189
189
  : offsetIndex + index;
190
- return (react_1.default.createElement(framer_motion_1.m.img, { key: index, animate: {
190
+ return (react_1.default.createElement(framer_motion_1.m.img, { key: zIndex, animate: {
191
191
  y: hasSelect
192
192
  ? vertical
193
193
  ? (average - index) * height +
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-magic-card",
3
- "version": "0.1.14",
3
+ "version": "0.1.16",
4
4
  "description": "image gallery component with framer motion",
5
5
  "main": "dist/index.js",
6
6
  "typings": "dist/index.d.ts",