Skip to content

Commit c4d259f

Browse files
committed
Updating README to reflect child element's required API
1 parent e982b26 commit c4d259f

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,14 @@ an intermediate wrapper (`<Draggable><span>...</span></Draggable>`) in this case
3636
The `<Draggable/>` component transparently adds draggable to whatever element is supplied as `this.props.children`.
3737
**Note**: Only a single element is allowed or an Error will be thrown.
3838

39+
In addition, the child element must provide support for the following props:
40+
- `style` is used to give the transform css to the child.
41+
- `className` is used to apply the proper classes to the object being dragged.
42+
- `onMouseDown` is used along with onMouseUp to keep track of dragging state.
43+
- `onMouseUp` is used along with onMouseDown to keep track of dragging state.
44+
- `onTouchStart` is used along with onTouchEnd to keep track of dragging state.
45+
- `onTouchEnd` is used along with onTouchStart to keep track of dragging state.
46+
3947
Props:
4048

4149
**`axis`**: determines which axis the draggable can move. Accepted values:

0 commit comments

Comments
 (0)