react-magic-card 0.1.8 → 0.1.9

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.
@@ -7,15 +7,19 @@ const react_1 = __importDefault(require("react"));
7
7
  const framer_motion_1 = require("framer-motion");
8
8
  const styles_module_css_1 = __importDefault(require("./styles.module.css"));
9
9
  const PickImage = ({ onClick, classPick, hasPick, hasShift, argRef, argKey, src, alt, width, height, zIndex, white = true, alpha = 0.4, blur = 4, scale = 2, offset = 200, transition }) => {
10
+ const backdropFilter = hasPick ? `blur(${blur}px)` : undefined;
11
+ const background = hasPick
12
+ ? white
13
+ ? `rgba(255, 255, 255, ${alpha})`
14
+ : `rgba(0, 0, 0, ${alpha})`
15
+ : undefined;
10
16
  return (react_1.default.createElement(framer_motion_1.m.div, { role: "button", onClick: onClick, ref: argRef, className: styles_module_css_1.default.full_size, animate: {
11
17
  zIndex: zIndex,
12
18
  opacity: hasPick ? 1 : 0,
13
19
  pointerEvents: hasPick ? 'auto' : 'none',
14
- backdropFilter: `blur(${blur}px)`,
15
- background: white
16
- ? `rgba(255, 255, 255, ${alpha})`
17
- : `rgba(0, 0, 0, ${alpha})`
18
- }, initial: { background: 'none' }, transition: transition },
20
+ backdropFilter: backdropFilter,
21
+ background: background
22
+ }, transition: transition },
19
23
  react_1.default.createElement(framer_motion_1.m.img, { className: classPick, onClick: e => e.stopPropagation(), key: argKey, src: src, alt: alt, width: width, height: height, animate: {
20
24
  zIndex: zIndex + 1,
21
25
  scale: scale,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-magic-card",
3
- "version": "0.1.8",
3
+ "version": "0.1.9",
4
4
  "description": "image gallery component with framer motion",
5
5
  "main": "dist/index.js",
6
6
  "typings": "dist/index.d.ts",