react-touch icon indicating copy to clipboard operation
react-touch copied to clipboard

Draggable is broken, documentation does not match requirements

Open AlexReff opened this issue 6 years ago • 1 comments

Please either release a working version of this library or update the documentation to reflect how to use it.

https://codesandbox.io/s/awesome-lewin-ms5t1

From the documentation:

<Draggable style={{translateX: 150, translateY: 200}}>
  {({translateX, translateY}) => {
    return (
      <div style={{transform: `translate3d(${translateX}px, ${translateY}px, 0)`}}>
        <Bubble />
      </div>
    );
  }}
</Draggable>

AlexReff avatar Jan 24 '20 18:01 AlexReff

I ran into the same problem. It seems like there would be an inconsistent use of the style / position property. You should be able to fix the problem by changing "style" to "position" when using the component if you use JavaScript or by changing "style" to "position" in the DraggableProps Type if you use TypeScript.

lukashaverbeck avatar Apr 05 '20 18:04 lukashaverbeck