@dtdot/lego 0.16.2 → 0.16.3

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.
@@ -79,7 +79,7 @@ const InlineCard = ({ children, size, onClick, gestureLeftIcon, gestureLeftVaria
79
79
  const theme = useTheme();
80
80
  const x = useMotionValue(0);
81
81
  const [ref, bounds] = useMeasure();
82
- const xInput = [-70, 0];
82
+ const xInput = [-50, 0];
83
83
  const gestureLeftTheme = getThemeStatusColour(gestureLeftVariant || 'info', theme);
84
84
  const [gestureLeftActivated, setGestureLeftActivated] = useState(false);
85
85
  const opacity = useTransform(x, xInput, ['1', '0']);
@@ -92,9 +92,7 @@ const InlineCard = ({ children, size, onClick, gestureLeftIcon, gestureLeftVaria
92
92
  };
93
93
  return (React.createElement(CardWrapper, { size: size },
94
94
  React.createElement(CardActionBackground, { style: { opacity, backgroundColor: gestureLeftTheme.main } }, gestureLeftIcon && (React.createElement(FontAwesomeIcon, { style: { fontSize: '20px', color: gestureLeftTheme.contrast }, icon: gestureLeftIcon }))),
95
- React.createElement(CardOuter, { drag: onGestureLeft ? 'x' : undefined, onDragEnd: handleDragEnd, ref: ref, style: { x }, animate: { x: gestureLeftActivated ? -bounds.width : undefined, opacity: gestureLeftActivated ? 0 : undefined },
96
- // animate={{ x: '-100%' }}
97
- dragConstraints: { left: 0, right: 0 }, usePointer: !!onClick, onClick: onClick }, children)));
95
+ React.createElement(CardOuter, { drag: onGestureLeft ? 'x' : undefined, onDragEnd: handleDragEnd, ref: ref, style: { x }, animate: { x: gestureLeftActivated ? -bounds.width : undefined, opacity: gestureLeftActivated ? 0 : undefined }, dragConstraints: { left: 0, right: 0 }, usePointer: !!onClick, onClick: onClick }, children)));
98
96
  };
99
97
  InlineCard.Media = InlineCardMedia;
100
98
  InlineCard.Content = InlineCardContent;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dtdot/lego",
3
- "version": "0.16.2",
3
+ "version": "0.16.3",
4
4
  "description": "Some reusable components for building my applications",
5
5
  "main": "build/index.js",
6
6
  "scripts": {