react-magic-card 0.1.18 → 0.1.19

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.
@@ -176,11 +176,15 @@ const MagicStraight = ({ images, height, width, vertical = true, margin = 0, sel
176
176
  return (react_1.default.createElement(framer_motion_1.LazyMotion, { features: framer_motion_1.domAnimation },
177
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
- width: !vertical ? height + controller + 'px' : 'fit-content',
180
- height: vertical ? width + controller + 'px' : 'fit-content',
179
+ width: !vertical
180
+ ? images.length * (width + margin * 2) + 'px'
181
+ : 'fit-content',
182
+ height: vertical
183
+ ? images.length * (height + margin * 2) + 'px'
184
+ : 'fit-content',
181
185
  padding: vertical
182
- ? controller + 'px' + ' ' + controller / 2 + 'px'
183
- : controller / 2 + 'px' + ' ' + controller + 'px',
186
+ ? controller + 'px ' + controller / 2 + 'px'
187
+ : controller / 2 + 'px ' + controller + 'px',
184
188
  flexDirection: vertical ? 'column' : 'row'
185
189
  } }, images.map((image, index) => {
186
190
  const hasSelect = images[select] == images[index];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-magic-card",
3
- "version": "0.1.18",
3
+ "version": "0.1.19",
4
4
  "description": "image gallery components with framer motion",
5
5
  "main": "dist/index.js",
6
6
  "typings": "dist/index.d.ts",